Merge pull request #8956 from c1728p9/don't_ignore_early_interrupts

Update Ticker wrapper to handle early interrupts
pull/8986/head
Martin Kojtal 2018-12-05 10:40:08 +01:00 committed by GitHub
commit 4491d1922b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -33,7 +33,12 @@ void LowPowerTickerWrapper::irq_handler(ticker_irq_handler_type handler)
{
core_util_critical_section_enter();
if (_pending_fire_now || _match_check(_intf->read()) || _suspended) {
// This code no longer filters out early interrupts. Instead it
// passes them through to the next layer and ignores further interrupts
// until the next call to set_interrrupt or fire_interrupt (when not suspended).
// This is to ensure that the device doesn't get stuck in sleep due to an
// early low power ticker interrupt that was ignored.
if (_pending_fire_now || _pending_match || _suspended) {
_timeout.detach();
_pending_timeout = false;
_pending_match = false;