Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed PlatformMgr().Shutdown() for NRF53 #390

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
#include <psa/crypto.h>
#endif

#if CONFIG_SOC_NRF5340_CPUAPP
#include <hal/nrf_reset.h>
#endif

#define DEFAULT_MIN_SLEEP_PERIOD (60 * 60 * 24 * 30) // Month [sec]

namespace chip {
Expand Down Expand Up @@ -124,6 +128,10 @@ template <class ImplClass>
void GenericPlatformManagerImpl_Zephyr<ImplClass>::_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.
Expand Down
Loading