Skip to content

Commit 436f1d1

Browse files
committed
Low power ticker wrapper fix
When the Timeout object has been setup to perform the next low power ticker write don't write to the low power ticker from lp_ticker_set_interrupt_wrapper. Instead write to it only from set_interrupt_later. This prevents a race condition where the low power ticker is written to in two places.
1 parent 81591b0 commit 436f1d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hal/mbed_lp_ticker_wrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void lp_ticker_set_interrupt_wrapper(timestamp_t timestamp)
122122
}
123123
}
124124

125-
if (pending) {
125+
if (pending || timeout_pending) {
126126
next = timestamp;
127127
last_request = current;
128128
if (!timeout_pending) {

0 commit comments

Comments
 (0)