RTCZero icon indicating copy to clipboard operation
RTCZero copied to clipboard

Clear flag after callback causes stall

Open jacky4566 opened this issue 6 years ago • 1 comments
trafficstars

https://github.com/arduino-libraries/RTCZero/blob/ac98e3da2809500ae50050e5dee12223461921a6/src/RTCZero.cpp#L115

Is there a reason the flag is cleared after the callback? Seems if you have too long of a callback (2+ seconds) then the RTC will hang the processors. Not sure the exact details but are we safe to clear the flag first then do callback? It would make it more noob friendly.

jacky4566 avatar Jun 12 '19 19:06 jacky4566

If we make that change (clear flag before calling callback), what happens if the callback takes longer to execute than the period of the interrupts? For example if the RTC is setup to interrupt every second but the callback takes more than a second to run.

drewfish avatar Jun 12 '19 19:06 drewfish