Open
Description
I have an issue with my SAMD21 board. The board consumes around 40uA in SLEEPDEEP mode. Only, after reprogramming the board, it consumes around 9mA. A lot more... The reset cause after reprogramming the board is 64, System Reset Request.
The low power sleep code:
setup(){
// Sets SLEEPDEEP
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
}
loop(){
// Put SAMD in sleep
__WFI()
}
The board goes back in sleep when the battery is unplugged/plugged back in. I can't figure out why the board doesn't sleep after programming.
Any help?