tests-mbed_hal-common_tickers_freq : correct overflowCounter value

pull/7009/head
jeromecoutant 2018-04-09 12:47:55 +02:00 committed by Bartek Szatkowski
parent d2fff9cab3
commit 26313d8938
1 changed files with 2 additions and 2 deletions

View File

@ -69,8 +69,6 @@ void ticker_frequency_test()
const uint32_t ticker_bits = intf->get_info()->bits;
const uint32_t ticker_max = (1 << ticker_bits) - 1;
overflowCounter = 0;
intf->init();
/* Detect overflow for tickers with lower counters width. */
@ -84,6 +82,8 @@ void ticker_frequency_test()
expected_key = strcmp(_key, "base_time");
} while (expected_key);
overflowCounter = 0;
const uint32_t begin_ticks = intf->read();
/* Assume that there was no overflow at this point - we are just after init. */