Run Time Statistics

oattypotter wrote on Saturday, May 08, 2010:

How can i use vTaskGetRunTimeStats()
I’ve already set as same as manual.
But I got a false result.
Thank You

davedoors wrote on Saturday, May 08, 2010:

Like so many posts here, there is not enough information given to allow people to provide a useful answer. For example, which cpu are you using?

oattypotter wrote on Sunday, May 09, 2010:

I use FreeRTOS with LPC2148

at first pic i don’t use vTaskGetRunTimeStats() the result is OK

but after i use vTaskGetRunTimeStats() it like that

How can i fix it?
How can i get the same result like the example?

Thank you

davedoors wrote on Sunday, May 09, 2010:

So this is what I am guessing: You have two tasks that are writing out to a terminal. At first they write their text out in turn and the text is output correctly. At some point you call vTaskGetRunTimeStats() and this generates a table that also looks correct, but from that point on the text that is output to the terminal is corrupt.  So:

1) Is my guess correct?
2) Have you checked that you are not overflowing the task stacks?
3) Why can I not see your two tasks in the table of tasks you have pasted into your post?
4) How are you taking care of mutual exclusion when writing to the terminal?