From 110a626b97afa766b48a205c2229a246ba3c3b24 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Mon, 29 Jun 2020 23:14:56 +0200 Subject: [PATCH] tests/periph_timer_periodic: lower CYCLE_MS Reduce CYCLE_MS to 25 ms so the period also fits into a 16 bit 1 MHz timer. --- tests/periph_timer_periodic/main.c | 2 +- tests/periph_timer_periodic/tests/01-run.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/periph_timer_periodic/main.c b/tests/periph_timer_periodic/main.c index cab5fba69a..09fc0c2580 100644 --- a/tests/periph_timer_periodic/main.c +++ b/tests/periph_timer_periodic/main.c @@ -38,7 +38,7 @@ * provides a configuration for it. */ #define TIMER_CYCL XTIMER_DEV -#define CYCLE_MS 100UL +#define CYCLE_MS 25UL #define CYCLES_MAX 10 static unsigned count[TIMER_CHANNEL_NUMOF]; diff --git a/tests/periph_timer_periodic/tests/01-run.py b/tests/periph_timer_periodic/tests/01-run.py index 6bc3edba51..2c370845d8 100755 --- a/tests/periph_timer_periodic/tests/01-run.py +++ b/tests/periph_timer_periodic/tests/01-run.py @@ -16,9 +16,9 @@ def testfunc(child): start = time.time() child.expect_exact('TEST SUCCEEDED') end = time.time() - # test should run 10 cycles with 100ms each - assert (end - start) > 1 - assert (end - start) < 1.5 + # test should run 10 cycles with 25ms each + assert (end - start) > 0.25 + assert (end - start) < 0.35 if __name__ == "__main__":