Skip to content

Commit 3f06911

Browse files
committed
Update Ticker wrapper to handle early interrupts
Update the LowPowerTickerWrapper class to handle rather than ignore early low power ticker interrupts. This ensures that devices don't get stuck in sleep due to a ignored early low power ticker interrupt.
1 parent f8e1116 commit 3f06911

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

hal/LowPowerTickerWrapper.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ void LowPowerTickerWrapper::irq_handler(ticker_irq_handler_type handler)
3333
{
3434
core_util_critical_section_enter();
3535

36-
if (_pending_fire_now || _match_check(_intf->read()) || _suspended) {
36+
// This code no longer filters out early interrupts. Instead it
37+
// passes them through to the next layer and ignores further interrupts
38+
// until the next call to set_interrrupt or fire_interrupt (when not suspended).
39+
// This is to ensure that the device doesn't get stuck in sleep due to an
40+
// early low power ticker interrupt that was ignored.
41+
if (_pending_fire_now || _pending_match || _suspended) {
3742
_timeout.detach();
3843
_pending_timeout = false;
3944
_pending_match = false;

0 commit comments

Comments
 (0)