Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


SAMv71 Evaluation Kit freeRTOS initialization + getRunTimeStats

Posted by mokrooussov on March 30, 2016

Hello, we have a pretty detailed question regarding to the RTOS implementation and usage generation values. At this point, I have been pursuing a FreeRTOS example project provided by Atmel in Atmel Studio 7. We have found multiple examples where initializing a GETRUNTIMESTATS configuration and using a vTaskGetRunTimeStats() provides a table in the form of: TASK ABS TIME % Time ------------------------------------------ In order for us to achieve this tabular interface, we took the following steps as detailed by RTOS website in this website: http://www.freertos.org/rtos-run-time-stats.html We added the following code to FreeRTOSconfig.h


We then added vTaskGetRunTimeStats() function in the task monitor function in the c main file and passed through an array construction, based on the following documentation: http://www.freertos.org/a00021.html#vTaskGetRunTimeStats The value passed through is a pcWriteBuffer, a buffer into which execution times will be written in ASCII form, approximately 40 bits per task used.

However, we found that when defining the ports in FreeRTOSconfig.h was complicated, we needed an incremented timer tick clock. The 2 examples in the first website referenced above, provides an example of a demo application that already includes a 20KHz timer test and one that does not. For the one that does not, we belive this resembles our situation. However, the definition they provide of a configuration of a timer for runtime stats in the main.c file does not fit our processor. We are currently attempting to discover a method for defining a peripheral clock. If you have any more questions or if you could assist us, we would be grateful.

SAMv71 Evaluation Kit freeRTOS initialization + getRunTimeStats

Posted by rtel on March 30, 2016

How you configure a chip specific timer is, I'm afraid, outside the scope of FreeRTOS support because its an Atmel hardware question not a FreeRTOS question. You have some options:

  • Look at the examples provided by Atmel, they will probably have one.
  • Read the data sheet and write the code yourself - generally timers are simple to program.
  • Ask on an Atmel specific forum.

Alternatively, you could use the cycle counter that is present on all Cortex-M devices. It is not very efficient to do that, but it will provide you with some numbers. The following file should work for you, and even comes from a SAM4E demo application, which I think is [at least pin] compatible with your part. https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Demo/CORTEXM4FATSAM4EAtmelStudio/src/RunTimeStatsTimer.c

[also look at the following function http://www.freertos.org/uxTaskGetSystemState.html]

[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists