tests: drivers: counter: Add delay for clock stabilization
On nRF platforms, Xtal LF clock source starts hundreds of milliseconds. Until it is not started, test may fail due to wrong timing. Add initial delay in the test for required clocks complete their start-up. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no> Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
parent
813e5bdd7a
commit
5c7c0713b8
1 changed files with 6 additions and 0 deletions
|
@ -801,6 +801,12 @@ void test_cancelled_alarm_does_not_expire(void)
|
|||
|
||||
void test_main(void)
|
||||
{
|
||||
/* Give required clocks some time to stabilize. In particular, nRF SoCs
|
||||
* need such delay for the Xtal LF clock source to start and for this
|
||||
* test to use the correct timing.
|
||||
*/
|
||||
k_busy_wait(USEC_PER_MSEC * 300);
|
||||
|
||||
ztest_test_suite(test_counter,
|
||||
ztest_unit_test(test_set_top_value_with_alarm),
|
||||
ztest_unit_test(test_single_shot_alarm_notop),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue