tests: counter: Fix test_multiple_alarms in counter_basic_api
Skip the test_multiple_alarms() test when the settop value is not supported. This is to avoid the case where wrap around take a long time thereby causing test failures Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This commit is contained in:
parent
649bb3bb44
commit
a8c7f82510
1 changed files with 6 additions and 0 deletions
|
@ -554,6 +554,12 @@ void test_multiple_alarms_instance(const char *dev_name)
|
|||
if (set_top_value_capable(dev_name)) {
|
||||
err = counter_set_top_value(dev, &top_cfg);
|
||||
zassert_equal(0, err, "%s: Counter failed to set top value", dev_name);
|
||||
} else {
|
||||
/* Counter does not support top value, do not run this test
|
||||
* as it might take a long time to wrap and trigger the alarm
|
||||
* resulting in test failures.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
k_busy_wait(3*(uint32_t)counter_ticks_to_us(dev, alarm_cfg.ticks));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue