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.
This commit is contained in:
parent
3222984cb9
commit
110a626b97
@ -38,7 +38,7 @@
|
|||||||
* provides a configuration for it.
|
* provides a configuration for it.
|
||||||
*/
|
*/
|
||||||
#define TIMER_CYCL XTIMER_DEV
|
#define TIMER_CYCL XTIMER_DEV
|
||||||
#define CYCLE_MS 100UL
|
#define CYCLE_MS 25UL
|
||||||
#define CYCLES_MAX 10
|
#define CYCLES_MAX 10
|
||||||
|
|
||||||
static unsigned count[TIMER_CHANNEL_NUMOF];
|
static unsigned count[TIMER_CHANNEL_NUMOF];
|
||||||
|
|||||||
@ -16,9 +16,9 @@ def testfunc(child):
|
|||||||
start = time.time()
|
start = time.time()
|
||||||
child.expect_exact('TEST SUCCEEDED')
|
child.expect_exact('TEST SUCCEEDED')
|
||||||
end = time.time()
|
end = time.time()
|
||||||
# test should run 10 cycles with 100ms each
|
# test should run 10 cycles with 25ms each
|
||||||
assert (end - start) > 1
|
assert (end - start) > 0.25
|
||||||
assert (end - start) < 1.5
|
assert (end - start) < 0.35
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user