vTaskGetRunTimeStats: 1 task > 100% CPU?
Posted by Thomas Johansen
on May 31, 2013
I'm using the vTaskGetRunTimeStats to get runtime information of the tasks.
But 1 task starts out with CPU usage to more than 100 % (A huge number ex: 152354223%)
The value is decreasing over time and ends up where it should be.
The task is straight forward, it waits on a queue with a timeout of 5 sec. The priority is just like the other task
Any idea what could cause this? Event if the task was badly written it should just ending up using 100 % !!
RE: vTaskGetRunTimeStats: 1 task > 100% CPU?
Posted by Richard
on May 31, 2013
I actually noticed something like this myself - while giving a live demonstration of all times for it to happen. I'm not sure what caused it but suspect it will be either an initialisation timing problem (whereby the first reading is taken before the timer used for the stats is initialised properly), or some kind of calculation rounding or underflow problem. Please report back if you find the answer - and in the mean time please also add a "bug report" in the FreeRTOS SourceForge bug tracker to ensure the problem is investigated properly.
Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd..
See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.