mbed-os/TESTS/mbed_drivers
Przemyslaw Stekiel b1b4f6e2ad tests-mbed_drivers-lp_timer: change delay method
The test sometimes fails on NRF51_DK (test case: "Test: LowPowerTimer - time measurement 1 ms.") in morph tests.

The test verifies if LowPowerTimer class correctly counts elapsed time. Sometimes we got measured ~1600 us for delay 1000 us (delta 550 us).
The delay is performed using `wait_us()` function which for delays greater than or equal to 1 ms (our case) calls `Thread::wait((uint32_t)ms);`. This causes rescheduling and potentially can put board into sleep (deep sleep mode is disabled by `wait_us()`). For our test purposes we don't need rescheduling/sleep since this actions takes extra time and have influence on the time measurement accuracy.
The solution is to implement function for delay which is based on busy loop and uses us ticker. It has been verified that this solves the problem. With this fix when measurement of 1 ms is repeated 1000 times we got usually measured time equal to ~1080 us, and sometimes ~1300us (checked that this is caused by systick interrupt handling). Since this is test for drivers layer and the results are acceptable I decided to not disabling systick in the test).
2018-07-11 11:44:27 +02:00
..
c_strings Adding test frameworks and test sources 2016-07-20 12:41:26 -05:00
crc Added test for MbedCRC.h 2018-03-23 14:54:24 -05:00
dev_null Adding test frameworks and test sources 2016-07-20 12:41:26 -05:00
echo Modifying echo test to be driven more from the device. 2018-04-23 17:56:13 -05:00
flashiap FlashIAP: Fix problem of programming source buffer not aligned to uint32_t 2018-05-10 12:00:29 +03:00
generic_tests Adding test frameworks and test sources 2016-07-20 12:41:26 -05:00
lp_ticker ticker test improvement 2018-06-08 15:37:59 +02:00
lp_timeout Rename DEVICE_LOWPOWERTIMER to DEVICE_LPTICKER 2018-05-25 12:20:09 -05:00
lp_timer tests-mbed_drivers-lp_timer: change delay method 2018-07-11 11:44:27 +02:00
mem_trace mem_trace tests refactoring 2017-12-22 07:56:56 +01:00
race_test Skip higher level ticker tests for targets with stale ticker target specific drivers. 2018-05-25 12:17:49 -05:00
rtc Skip higher level ticker tests for targets with stale ticker target specific drivers. 2018-05-25 12:18:55 -05:00
sleep_lock Add a test to validate locking 2017-10-02 11:35:03 -05:00
stl_features Added function header for stl test 2017-09-06 09:51:16 -05:00
ticker ticker test improvement 2018-06-08 15:37:59 +02:00
timeout Enlarge wait time in Greentea test function test_deepsleep 2018-06-19 09:23:53 +08:00
timer set the tolerance to 5% if NO_SYSTICK is enabled 2018-05-31 13:05:37 +01:00
timerevent tests-mbed_drivers-timerevent: increase tolerance for NRF52_DK 2018-05-25 12:33:42 -05:00