From 37fe7504ce1791976cae5cfe8d8fe0f03b122d36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Fri, 14 Mar 2025 08:14:06 +0100 Subject: [PATCH] soc: nordic: nrf54h: power: Add idle tracing calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- soc/nordic/nrf54h/power.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/soc/nordic/nrf54h/power.c b/soc/nordic/nrf54h/power.c index a3b39a4c5fe..e06262c26aa 100644 --- a/soc/nordic/nrf54h/power.c +++ b/soc/nordic/nrf54h/power.c @@ -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