From 6d15e4314578e884a973aa98f9d101cb5850268a Mon Sep 17 00:00:00 2001 From: Balthazar DELIERS Date: Mon, 19 Feb 2024 12:18:40 +0100 Subject: [PATCH] Added network core reset for the NRF53 when calling PlatformMgr::Shutdown Signed-off-by: Balthazar DELIERS --- .../internal/GenericPlatformManagerImpl_Zephyr.ipp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.ipp b/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.ipp index 7a5d9c265b..c46b36a382 100644 --- a/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.ipp +++ b/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.ipp @@ -42,6 +42,10 @@ #include #endif +#if CONFIG_SOC_NRF5340_CPUAPP + #include +#endif + #define DEFAULT_MIN_SLEEP_PERIOD (60 * 60 * 24 * 30) // Month [sec] namespace chip { @@ -124,6 +128,10 @@ template void GenericPlatformManagerImpl_Zephyr::_Shutdown(void) { #ifdef CONFIG_REBOOT + // Reset the network core first to avoid a hard fault because of the communication broken between cores. + #if CONFIG_SOC_NRF5340_CPUAPP + nrf_reset_network_force_off(NRF_RESET, false); + #endif sys_reboot(SYS_REBOOT_WARM); #else // NB: When this is implemented, |mInitialized| can be removed.