File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 11name =Adafruit SleepyDog Library
2- version =1.6.0
2+ version =1.6.1
33author =Adafruit
44maintainer =Adafruit <
[email protected] >
55sentence =Arduino library to use the watchdog timer for system reset and low power sleep.
Original file line number Diff line number Diff line change @@ -209,19 +209,20 @@ int WatchdogSAMD::sleep(int maxPeriodMS) {
209209 ; // Wait for it to take
210210#else
211211 SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
212- // Due to a hardware bug on the SAMD21, the SysTick interrupts become
212+ // Due to a hardware bug on the SAMD21, the SysTick interrupts become
213213 // active before the flash has powered up from sleep, causing a hard fault.
214- // To prevent this the SysTick interrupts are disabled before entering sleep mode.
215- SysTick->CTRL &= ~SysTick_CTRL_TICKINT_Msk; // Disable SysTick interrupts
214+ // To prevent this the SysTick interrupts are disabled before entering sleep
215+ // mode.
216+ SysTick->CTRL &= ~SysTick_CTRL_TICKINT_Msk; // Disable SysTick interrupts
216217#endif
217218
218219 __DSB (); // Data sync to ensure outgoing memory accesses complete
219220 __WFI (); // Wait for interrupt (places device in sleep mode)
220221
221222#if (SAMD20_SERIES || SAMD21_SERIES)
222- SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk; // Enable SysTick interrupts
223+ SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk; // Enable SysTick interrupts
223224#endif
224-
225+
225226 // Code resumes here on wake (WDT early warning interrupt).
226227 // Bug: the return value assumes the WDT has run its course;
227228 // incorrect if the device woke due to an external interrupt.
You can’t perform that action at this time.
0 commit comments