arduino-libraries / RTCZero

RTC Library for SAMD21 based boards
http://arduino.cc/en/Reference/RTC
GNU Lesser General Public License v2.1
78 stars 78 forks source link

fix wake lockup and bus stall #46

Closed sslupsky closed 4 years ago

sslupsky commented 5 years ago

The PR addresses two issues:

First, there is a problem when waking from sleep that Microchip has acknowledged. To address the case a hard fault resets the device, the SysTick interrupt must be disabled.

For more information see https://www.avrfreaks.net/forum/samd21-samd21e16b-sporadically-locks-and-does-not-wake-standby-sleep-mode

The second issue is correcting the same issue described in PR #44 that exists for the setAlarmEpoch() method.

sslupsky commented 5 years ago

Apologies, I did not notice the tabs and forgot to remove the commented code.

ravelab commented 5 years ago

@sslupsky @per1234 the first issue is critical as it sporadically resets the processor. this PR fixed my issue (I was sleeping every second, and the process resets after about 3 hours), and I think it should be merged ASAP. If there is concern about the fix for the second issue, maybe it should be separated out?

sslupsky commented 5 years ago

@per1234 Is this change going to be merged?