Calculating task Execution Time

ose wrote on Tuesday, April 24, 2018:

Hello,
I want to calculate the execution time of a task. I have read the write up here http://www.freertos.org/rtos-run-time-stats.html and i understood to an extent how to go about it but I dont quite get what is being refeered to as the “tick interrupt”.
I would love a clearer explanation.

and please is there a demo application apart from the one on the link above? I am using an arduino uno board with atmelmega chip.

rtel wrote on Tuesday, April 24, 2018:

The tick interrupt is the periodic interrupt used by FreeRTOS for all
its timing. Its frequency is set by configTICK_RATE_HZ in
FreeRTOSConfig.h. All block times are specified in ‘ticks’, that is,
tick periods. So if you have a tick frequency of 1000Hz and ask for a
block time of 1000 you will block for one second. You can use the
pdMS_TO_TICKS( xTimeInMS) macro to convert milliseconds into ticks
within the margin of error introduced by integer rounding.

If you grep the FreeRTOS/Demo directory for
vConfigureTimerForRunTimeStats you will find other examples.