mrasool wrote on Thursday, May 15, 2008:
Hi all,
I have read other threads on using timers in FreeRTOS, and I have tried to use vApplicationTickHook. I have made a global variable "time_ticks" which is incremented on every call to vApplicationTickHook, But as I run the code, this hook is only triggered when my task is doing nothing, i.e when I call vTaskDelay. This means that I can only count the ticks of delay of a task. But I need a timer, e.g. I want to calculate how much time is taken by a particular code to run. So i want to save some timer value before starting the task, and then get the value of elapsed time after the task has finished its work.
How can I do it in FreeRTOS? Like in TinyOS, there is Timer module, and you can start a timer and stop it and take its value at any point of time.
Immediate response will be highly appreciated!
Thanks in advance,
–
Mudassir