Skip to content

Commit 4491d19

Browse files
authored
Merge pull request #8956 from c1728p9/don't_ignore_early_interrupts
Update Ticker wrapper to handle early interrupts
2 parents be817ba + 3f06911 commit 4491d19

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)