Hi ,
I use TMS570ls3137 and how can I determine CPU utilization for a task in FreeRtos.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi ,
I use TMS570ls3137 and how can I determine CPU utilization for a task in FreeRtos.
Hans,
Haven't tried this myself but i think you're looking for something like this:
http://www.freertos.org/rtos-run-time-stats.html
is that correct?
thank you for this reply.However, i do not want to this. I want to see tick count and I want to determine executing time.But exactly time..İf I use rti module(not used FreeRtos), I can determine this with rtiGetCurrentTick function. In Freertos , how can I do this ?
Hans,
What are you wanting to measure exactly? If you just read the start/end times of a task from the RTI then you'll not necessarily get the CPU load due to that task; because if the task is pre-empted you will also get the execution time of the code that prempted your task in question.
For example, if you look at the user's guide "Using the FreeRTOS Real Time Kernel" figure 3 shows two tasks:
If you read the counter at the beginning and end of Task1 - you'll also get the first and 2nd executions of Task 2 in this result. This will be more than just the load of Task 1. Is that what you want?
Yes. I want to execute time of task1. End(task1) - Start(task1).. Consequently, Task1 can be pre-empted but not finish. I want to determine (finish time) - (start time) ..
Hi Hans,
This might be a better question for the FreeRTOS forum, since I won't claim to be an expert on FreeRTOS.
I've got the reference manual though and to me the xTaskGetTickCount() function looks like the one to start with, however the reference manual does have some cautions that you need to consider regarding what happens when the tick counter overflows. So might be work getting the reference manual if you don't already have a copy. (It's not free, but the cost is pretty nominal).