Measure Time within a Task with xTaskGetTickCount()

Hi, I am trying to measure the execution time of a function a FreeRTOS task with xTaskGetTickCount(). The code looks like the following example. ~~~ static void prvRxTask( void *pvParameters ) {
for( ;; )
{
    long start = xTaskGetTickCount();
    func_doing_something();
    long stop = xTaskGetTickCount() - start;

    vTaskDelay( pdMS_TO_TICKS( 1000UL ) );

}
} ~~~ My result of stop is always “0” because the xTaskGetTickCount() gets not incremented durring the tasks execution. Why is that so? (I activated the timer in the FreeRTOSConfig.h) If it is relevant, I am using a Zedboard with a Zynq 7000 SoC.

Measure Time within a Task with xTaskGetTickCount()

Duplicate of https://sourceforge.net/p/freertos/discussion/382005/thread/6d2307a0/