Skip to content

Commit

Permalink
Fix overflow issue causing common tickers test to intermittently fail (
Browse files Browse the repository at this point in the history
…ARMmbed#57)

* Fix overflow issue causing common tickers test to intermittently fail (ARMmbed#44)

* Tabs -> spaces
  • Loading branch information
multiplemonomials authored Sep 25, 2022
1 parent 1d44be2 commit 60a3a4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hal/tests/TESTS/mbed_hal/common_tickers/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ void ticker_interrupt_test(void)
uint8_t run_count = 0;
const ticker_info_t *p_ticker_info = intf->get_info();

overflow_protect();

for (uint32_t i = 0; i < (sizeof(ticker_timeout) / sizeof(uint32_t)); i++) {
// If needed, delay until we can run the test without overflowing the ticker.
overflow_protect();

/* Skip timeout if less than max allowed execution time of set_interrupt() - 20 us */
if (TICKS_TO_US(ticker_timeout[i], p_ticker_info->frequency) < (MAX_FUNC_EXEC_TIME_US + DELTA_FUNC_EXEC_TIME_US)) {
Expand Down

0 comments on commit 60a3a4e

Please sign in to comment.