user17170: Has anyone got sleep/standby + watchdog to work together on their Arduino Zero or Sparkfun SAMD mini?
I am able to get the WDT to reset the device, and am able to put it to sleep - but can't get the WDT to bring it out of sleep.  Every time I try, it pops right back out of sleep mode again as if SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk was never even called

user36791: use this:
attachInterrupt(wakeUpPin, wakeupFunction, HIGH);
    USBDevice.detach();
    SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
    __DSB();
    __WFI();

void wakeupFunction(){
  NVIC_SystemReset();
}


17170: <p>Has anyone got sleep/standby + watchdog to work together on their Arduino Zero or Sparkfun SAMD mini?</p>

<p>I am able to get the WDT to reset the device, and am able to put it to sleep - but can't get the WDT to bring it out of sleep.  Every time I try, it pops right back out of sleep mode again as if <code>SCB-&gt;SCR |= SCB_SCR_SLEEPDEEP_Msk</code> was never even called</p>
 36791: <p>use this:</p>

<pre><code>attachInterrupt(wakeUpPin, wakeupFunction, HIGH);
    USBDevice.detach();
    SCB-&gt;SCR |= SCB_SCR_SLEEPDEEP_Msk;
    __DSB();
    __WFI();

void wakeupFunction(){
  NVIC_SystemReset();
}
</code></pre>
