tests-mbed_drivers-lp_ticker: increase tolerance for NRF51_DK

This test fails sometimes while testing 1 ms timeout on NRF51_DK board.
This board is very slow and lp ticker is inaccurate.
I noticed that measured results are very close to the tolerance value. For 1ms delay we measure in failure case 1560 us and tolerance is set to 550.
Since measurement method is also significantly flawed (extra time for setting up ticker and execution of a ticker irq handler) I recommend to increase tolerance by least +100 us for now.
pull/7009/head
Przemyslaw Stekiel 2018-05-17 13:30:20 +02:00 committed by Bartek Szatkowski
parent a3d5921515
commit 75df9ecd19
1 changed files with 2 additions and 2 deletions

View File

@ -33,9 +33,9 @@ static const int test_timeout = 10;
/* Due to poor accuracy of LowPowerTicker on many platforms
there is no sense to tune tolerance value as it was in Ticker tests.
Tolerance value is set to 500us for measurement inaccuracy + 5% tolerance
Tolerance value is set to 600us for measurement inaccuracy + 5% tolerance
for LowPowerTicker. */
#define TOLERANCE_US(DELAY) (500 + DELAY / 20)
#define TOLERANCE_US(DELAY) (600 + DELAY / 20)
volatile uint32_t ticker_callback_flag;