-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
If the function ulTaskGetRunTimeCounter is called for the current running task (i.e., with the parameter being NULL), the returned time counter value will not include the time since the task was switched in because the counter pxTCB->ulRunTimeCounter is only updated on context switch. If the task has high priority and has been running for long time, the reported time will have remarkable error.
The functions ulTaskGetRunTimePercent and vTaskGetInfo also have this issue.
Target
Any
Host
Any
To Reproduce
By reviewing the code
Expected behavior
The function ulTaskGetRunTimeCounter shall update the running time for the calling task before returning the result.
https://forums.freertos.org/t/issue-with-ultaskgetruntimecounter/21994/3
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working