We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 28ac288 + c2760be commit 2fab524Copy full SHA for 2fab524
hal/mbed_ticker_api.c
@@ -235,6 +235,14 @@ static void schedule_interrupt(const ticker_data_t *const ticker)
235
}
236
237
timestamp_t match_tick = compute_tick(ticker, match_time);
238
+ // The time has been checked to be future, but it could still round
239
+ // to the last tick as a result of us to ticks conversion
240
+ if (match_tick == queue->tick_last_read) {
241
+ // Match time has already expired so fire immediately
242
+ ticker->interface->fire_interrupt();
243
+ return;
244
+ }
245
+
246
ticker->interface->set_interrupt(match_tick);
247
timestamp_t cur_tick = ticker->interface->read();
248
0 commit comments