mirror of https://github.com/ARMmbed/mbed-os.git
Serial buffer must be flushed before entering deep sleep mode. In the test this is done by the additional delay which is implemented on the busy loop which decrements given value down to 0 (`void wait_cycles(volatile unsigned int cycles)`). This solution is not appropriate since it is very target specific and the cycles value has been already increased few times. Additionally very big number of loop cycles which is suitable for fast targets may take much longer on slower boards and results in test timeout. It has been verified that 20ms is sufficient delay for the green-tea transmission. In this test we cannot simply use `wait_ms(20)` since this potentially may put board to sleep and wake up using lp ticker. The test re-initialzies the lp ticker(disables ticker interrupt) and this operation may break the schedule and time tracing by the upper layer. But we can use us ticker which is not affected by this test. The solution is to add a delay routine based on busy loop and us ticker only. This way are able to wait exactly 20 ms. |
||
---|---|---|
.. | ||
common_tickers | ||
common_tickers_freq | ||
crc | ||
critical_section | ||
flash/functional_tests | ||
lp_ticker | ||
rtc | ||
rtc_reset | ||
rtc_time | ||
rtc_time_conv | ||
sleep | ||
sleep_manager | ||
sleep_manager_racecondition | ||
ticker | ||
us_ticker |