soc: atmel: sam: common: add warm reboot to soc_power.c
If a warm reboot is issued (e.g., via mcumgr reset), the sam controller just hangs because of loop in reboot.c. This can be devastating if no watchdog is present to reboot the controller. Signed-off-by: Jaro Van Landschoot <jaro.vanlandschoot@basalte.be>
This commit is contained in:
committed by
Maureen Helm
parent
c898f775d2
commit
853d33e8e3
@@ -19,6 +19,7 @@ void sys_arch_reboot(int type)
|
||||
Rstc *regs = (Rstc *)DT_REG_ADDR(SAM_DT_RSTC_DRIVER);
|
||||
|
||||
switch (type) {
|
||||
case SYS_REBOOT_WARM:
|
||||
case SYS_REBOOT_COLD:
|
||||
regs->RSTC_CR = RSTC_CR_KEY_PASSWD
|
||||
| RSTC_CR_PROCRST
|
||||
|
||||
Reference in New Issue
Block a user