We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4caff77 commit 892594aCopy full SHA for 892594a
src/samd/ArduinoLowPower.cpp
@@ -23,9 +23,13 @@ void ArduinoLowPowerClass::sleep() {
23
USBDevice.detach();
24
restoreUSBDevice = true;
25
}
26
+ // Disable systick interrupt: See https://www.avrfreaks.net/forum/samd21-samd21e16b-sporadically-locks-and-does-not-wake-standby-sleep-mode
27
+ SysTick->CTRL &= ~SysTick_CTRL_TICKINT_Msk;
28
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
29
__DSB();
30
__WFI();
31
+ // Enable systick interrupt
32
+ SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk;
33
if (restoreUSBDevice) {
34
USBDevice.attach();
35
0 commit comments