Skip to content

Commit 83c5c72

Browse files
nordic-krchrlubos
authored andcommitted
[nrf fromtree] 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 <[email protected]> (cherry picked from commit 37fe750)
1 parent c94dc35 commit 83c5c72

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

soc/nordic/nrf54h/power.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,21 @@ void pm_state_set(enum pm_state state, uint8_t substate_id)
184184
{
185185
if (state == PM_STATE_SUSPEND_TO_IDLE) {
186186
__disable_irq();
187+
sys_trace_idle();
187188
s2idle_enter(substate_id);
188189
/* Resume here. */
189190
s2idle_exit(substate_id);
191+
sys_trace_idle_exit();
190192
__enable_irq();
191193
}
192194
#if defined(CONFIG_PM_S2RAM)
193195
else if (state == PM_STATE_SUSPEND_TO_RAM) {
194196
__disable_irq();
197+
sys_trace_idle();
195198
s2ram_enter();
196199
/* On resuming or error we return exactly *HERE* */
197200
s2ram_exit();
201+
sys_trace_idle_exit();
198202
__enable_irq();
199203
}
200204
#endif

0 commit comments

Comments
 (0)