![]() |
PDK API Guide for J7200
|
LoadP interface
Files | |
| file | LoadP.h |
| Load module to measure CPU Load and Task Load for the RTOS Porting Interface. | |
Data Structures | |
| struct | LoadP_Stats |
| Load statistics info. More... | |
Functions | |
| void | LoadP_reset (void) |
| Function to Reset load statistics. More... | |
| LoadP_Status | LoadP_getTaskLoad (TaskP_Handle taskHandle, LoadP_Stats *stats) |
| Function to get task load statistics. More... | |
| uint32_t | LoadP_getCPULoad (void) |
| Function to get CPU load in percentage. More... | |
| void | LoadP_update (void) |
| Update load statistics. More... | |
| uint32_t | LoadP_calcCounterDiff (uint32_t cur, uint32_t last) |
| Function to get timer counter Difference. More... | |
Enumerations | |
| enum | LoadP_Status { LoadP_OK = 0, LoadP_FAILURE = (-(int32_t)1) } |
| Status codes for LoadP APIs. More... | |
| enum LoadP_Status |
| void LoadP_reset | ( | void | ) |
Function to Reset load statistics.
Until load statistics is reset the load statistics keep getting accumulated.
| LoadP_Status LoadP_getTaskLoad | ( | TaskP_Handle | taskHandle, |
| LoadP_Stats * | stats | ||
| ) |
Function to get task load statistics.
| taskHandle | [in] A TaskP_Handle returned from TaskP_create |
| stats | [out] Returned Task Load stats |
| uint32_t LoadP_getCPULoad | ( | void | ) |
Function to get CPU load in percentage.
| void LoadP_update | ( | void | ) |
Update load statistics.
This updates task load statistics for all tasks created with TaskP_create().
Also updates idle task load/CPU Load.
This function is called, every "configLOAD_WINDOW_IN_MS" msecs within the IDLE task.
It is important that idle task get to run atleast once every "configLOAD_WINDOW_IN_MS" msecs
for the load statistics to be correct
In case of FreeRTOS, FreeRTOSConfig.h enables update in idle
and idle task calls this API.
FreeRTOSConfig.h:-
#define configLOAD_UPDATE_IN_IDLE (1)
#define configLOAD_WINDOW_IN_MS (500)
| uint32_t LoadP_calcCounterDiff | ( | uint32_t | cur, |
| uint32_t | last | ||
| ) |
Function to get timer counter Difference.