Skip to content

Update Ticker wrapper to handle early interrupts #8956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion hal/LowPowerTickerWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down