1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/periph/timer
Marian Buschsieweke aa045d540f
tests/periph/timer: fix timeout computation and overflow handling
- the timeout computation for the spurious IRQ test confused numerator
  and denominator in a fraction
- the timeout offset between timer channels was hardcoded to 5000 from
  when the timer was only tested with 1 MHz as frequency
    - This resulted in slooooow test runs when running at slow
      frequencies
- fix overflow handling in the spinning wait
    - likely this would never overflow anyway assuming that
      `timer_init()` resets the counter value, but let's not rely on
      this and just fix the bug for good
2023-12-07 16:07:24 +01:00
..
tests tests/periph_timer: use periph_timer_query_freqs 2023-12-05 16:07:27 +01:00
app.config.test tests: move periph_ applications to periphs subdirectory 2023-05-06 15:29:51 +02:00
Kconfig tests/periph_timer: use periph_timer_query_freqs 2023-12-05 16:07:27 +01:00
main.c tests/periph/timer: fix timeout computation and overflow handling 2023-12-07 16:07:24 +01:00
Makefile tests/periph_timer: use periph_timer_query_freqs 2023-12-05 16:07:27 +01:00
Makefile.ci examples, tests: update Makefile.ci for AVR8 2023-12-01 19:37:05 +01:00
README.md tests: move periph_ applications to periphs subdirectory 2023-05-06 15:29:51 +02:00

Periph Timer Test

About

This application will test all configured peripheral timers of the target platform. For each timer, it will set each channel with an incrementing timeout: CH0 is set to 5ms, CH1 to 10ms, CH2 to 15ms and so on.

Expected Result

The output should show that every channel fired after an evenly distributed amount of time, i.e. the diff values should be equal (with some jitter...).

Note

This test does however NOT show whether the timeouts and diffs were correct in relation to the expected real-time; use e.g. tests/xtimer_msg for this.