soc: nordic: nrf54h: power: Add idle tracing calls
Add calls to sys_trace_idle and sys_trace_idle_exit in nrf54h specific idle states to allow measuring CPU load on nrf54h20 when power management is enabled. Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
29bc28a09a
commit
37fe7504ce
1 changed files with 4 additions and 0 deletions
|
@ -175,17 +175,21 @@ void pm_state_set(enum pm_state state, uint8_t substate_id)
|
|||
{
|
||||
if (state == PM_STATE_SUSPEND_TO_IDLE) {
|
||||
__disable_irq();
|
||||
sys_trace_idle();
|
||||
s2idle_enter(substate_id);
|
||||
/* Resume here. */
|
||||
s2idle_exit(substate_id);
|
||||
sys_trace_idle_exit();
|
||||
__enable_irq();
|
||||
}
|
||||
#if defined(CONFIG_PM_S2RAM)
|
||||
else if (state == PM_STATE_SUSPEND_TO_RAM) {
|
||||
__disable_irq();
|
||||
sys_trace_idle();
|
||||
s2ram_enter();
|
||||
/* On resuming or error we return exactly *HERE* */
|
||||
s2ram_exit();
|
||||
sys_trace_idle_exit();
|
||||
__enable_irq();
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue