Skip to content

Commit 6d15e43

Browse files
committed
Added network core reset for the NRF53 when calling PlatformMgr::Shutdown
Signed-off-by: Balthazar DELIERS <balthazar.deliers@psicontrol.com>
1 parent c36fcaf commit 6d15e43

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.ipp

+8
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
#include <psa/crypto.h>
4343
#endif
4444

45+
#if CONFIG_SOC_NRF5340_CPUAPP
46+
#include <hal/nrf_reset.h>
47+
#endif
48+
4549
#define DEFAULT_MIN_SLEEP_PERIOD (60 * 60 * 24 * 30) // Month [sec]
4650

4751
namespace chip {
@@ -124,6 +128,10 @@ template <class ImplClass>
124128
void GenericPlatformManagerImpl_Zephyr<ImplClass>::_Shutdown(void)
125129
{
126130
#ifdef CONFIG_REBOOT
131+
// Reset the network core first to avoid a hard fault because of the communication broken between cores.
132+
#if CONFIG_SOC_NRF5340_CPUAPP
133+
nrf_reset_network_force_off(NRF_RESET, false);
134+
#endif
127135
sys_reboot(SYS_REBOOT_WARM);
128136
#else
129137
// NB: When this is implemented, |mInitialized| can be removed.

0 commit comments

Comments
 (0)