From 08d327d59536873d8bd3c798b7b26b7310835f4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Wed, 16 Apr 2025 13:12:23 +0200 Subject: [PATCH] soc: nordic: nrf54h: Fix s2ram MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cache was not enabled when s2ram did not completed which lead to system malfunction. Always power up cache when returning from s2ram function. Signed-off-by: Krzysztof Chruściński --- soc/nordic/nrf54h/pm_s2ram.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soc/nordic/nrf54h/pm_s2ram.c b/soc/nordic/nrf54h/pm_s2ram.c index 56e5e080233..c18c9650cdc 100644 --- a/soc/nordic/nrf54h/pm_s2ram.c +++ b/soc/nordic/nrf54h/pm_s2ram.c @@ -167,12 +167,12 @@ int soc_s2ram_suspend(pm_s2ram_system_off_fn_t system_off) nvic_suspend(&backup_data.nvic_context); mpu_suspend(&backup_data.mpu_context); ret = arch_pm_s2ram_suspend(system_off); + /* Cache is powered down so power up is needed even if s2ram failed. */ + nrf_power_up_cache(); if (ret < 0) { return ret; } - nrf_power_up_cache(); - mpu_resume(&backup_data.mpu_context); nvic_resume(&backup_data.nvic_context); scb_resume(&backup_data.scb_context);