Library Functions.
More...
Library Functions.
Goes to low power mode and measures sleeping time and working time using DWT cycle counter.
- Note
- You need wake up source, otherwise you might stay forever inside low power mode
- Parameters
-
| *CPU_Load | Pointer to TM_CPULOAD_t structure |
| PowerMode | Select power mode you want to use for measure CPU load. Valid parameters are:
- TM_LOWPOWERMODE_SleepUntilInterrupt: Go to sleep mode with __WFI() instruction
- TM_LOWPOWERMODE_SleepUntilEvent: Go to sleep mode with __WFE() instruction
|
- Return values
-
| CPU | load value updated status.
- 0: CPU load value is not updated, still old results
- > 0: CPU load value is updated
|
Initializes DWT functionality for sleep counter and prepares everything for CPU LOAD measurement.
- Parameters
-
- Return values
-
| Returns | DWT counter status:
- 0: DWT counter has not started, measurement will fail
- > 0: DWT counter has started, everything OK
|