diff --git a/TESTS/mbed_hal/common_tickers/main.cpp b/TESTS/mbed_hal/common_tickers/main.cpp index e1a26dc79e1..7bf90bb1fd8 100644 --- a/TESTS/mbed_hal/common_tickers/main.cpp +++ b/TESTS/mbed_hal/common_tickers/main.cpp @@ -129,7 +129,7 @@ void overflow_protect() return; } - while (intf->read() > ticks_now); + while (intf->read() >= ticks_now); } void ticker_event_handler_stub(const ticker_data_t *const ticker) diff --git a/TESTS/mbed_hal/lp_ticker/main.cpp b/TESTS/mbed_hal/lp_ticker/main.cpp index 58ff4acf7f1..00284378e24 100644 --- a/TESTS/mbed_hal/lp_ticker/main.cpp +++ b/TESTS/mbed_hal/lp_ticker/main.cpp @@ -85,7 +85,7 @@ void overflow_protect() return; } - while (lp_ticker_read() > ticks_now); + while (lp_ticker_read() >= ticks_now); } void ticker_event_handler_stub(const ticker_data_t *const ticker)