1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

27 Commits

Author SHA1 Message Date
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
Marian Buschsieweke
8e67ee31ef
tests/periph/timer: rename speed --> timer_freq 2023-12-07 15:02:36 +01:00
Marian Buschsieweke
3bc6494004
tests/periph_timer: use periph_timer_query_freqs
If the feature periph_timer_query_freqs is provided, use the
corresponding function to iterate over all supported frequencies to
increase test coverage.
2023-12-05 16:07:27 +01:00
Marian Buschsieweke
82d98ed377
examples, tests: update Makefile.ci for AVR8
Ran dist/tools/insufficient_memory for all AVR8 boards.
2023-12-01 19:37:05 +01:00
Marian Buschsieweke
b90f985d47
tests/periph/spi: allow use on more boards
- Disable the benchmark on low memory boards
- Reduce the help message length on low memory boards
- Update to new shell command interface using XFA
2023-11-30 11:10:04 +01:00
benpicco
c93a5b84a3
Merge pull request #20020 from gompper/periph/freqm
drivers/include/periph: add FREQM peripheral driver
2023-11-27 16:06:52 +00:00
Urs Gompper
4a9ae47499 tests/periph: add test-application for peripheral freqm 2023-11-23 20:53:14 +01:00
Marian Buschsieweke
fb9abe3626
tests/periph/selftest_shield: fix a misplaced comment
Move it to the correct place
2023-11-22 10:29:33 +01:00
Marian Buschsieweke
64b95a34e9
tests/periph/selftest_shield: improve output on error
Use `tiny_strerror()` to report back errors when calling initialization
functions.
2023-11-22 10:29:33 +01:00
Marian Buschsieweke
57488a57ab
tests/periph/selftest_shield: timer allocation conflict
- Detect when the same timer is used by `ztimer` (pulled in as
  dependency for a peripheral driver, e.g. `periph_adc` on STM32F3) and
  the test application
- Try to provide a better default (e.g. `TIMER_DEV(1)` when
  `ztimer_periph_timer` is in use, `TIMER_DEV(0)` otherwise)
2023-11-20 17:17:26 +01:00
Marian Buschsieweke
4e7f972303
Merge pull request #20089 from maribu/tests/periph/selftest_shield2
tests/periph/selftest_shield: improve SPI test
2023-11-16 14:39:38 +00:00
Marian Buschsieweke
66d38101d8
tests/periph/selftest_shield: Consistently use DETAILED_OUTPUT
There already is `DETAILED_OUTPUT` to trade ROM size for more verbose
error messages, no need to abuse `DEBUG()` for the same as well.
2023-11-16 12:59:50 +01:00
Marian Buschsieweke
f51ca593ba
tests/periph/selftest_shield: re-enable ADC test
The R-2R resistor ladder dac --> ADC test was disabled due to a bug in
the v0.1 version of the shield. Since this has been fixed in v0.2 and
v0.3 of the shield, it can be re-enabled.

The comment regarding the high accuracy of the resistor is dropped, as
v0.3 has been ordered with cost efficient resistors rather than with
accurate ones. As a result, the tolerance for error has been increased
to 10%. This quite a bit more lax than I have hoped for, but false
positives would be something to avoid.
2023-11-16 12:59:50 +01:00
Marian Buschsieweke
af6bb03bc7
tests/periph/selftest_shield: improve SPI test
- fix a copy-paste error (`TIMER_FREQ_UART_TEST` was used in the SPI
  test, but that should be `TIMER_FREQ_SPI_TEST`)
- use 400 kHz as slow SPI frequency, as faster STM32 MCUs just cannot
  divide the APB clock down to 100 kHz
- when detailed output is enabled, print the SPI clock in addition to
  the SPI mode to ease figuring out what went wrong
- only have one `FAILURE` message for a too fast byte transfer per
  check, rather than per transmitted byte, to reduce the noise
- work around a bug of `periph_timer` on STM32 by reducing the clock
  speed of the timer for the SPI test
2023-11-15 20:29:53 +01:00
Marian Buschsieweke
d6dac4bee2
tests/periph/selftest_shield: Fix copy-paste error in comment 2023-11-13 15:53:58 +01:00
Marian Buschsieweke
b6252b334d
tests/periph/selftest_shield: fix integration
The test should execute only with `make test-with-config` and not with
`make test`, as boards without the shield cannot pass the test.

For some reason I accidentally added both variants, which makes no
sense. This drops the `make test` variant.

Finally, the `README.md` is updated to refer to `make test-with-config`
instead of `make test`.
2023-11-13 14:17:03 +01:00
Marian Buschsieweke
bf582b0d68
Merge pull request #19932 from maribu/peripheral-selftest
tests/periph: Add test using the Peripheral Selftest Shield
2023-11-10 18:12:42 +00:00
Marian Buschsieweke
d7cf39551f
tests/periph/selftest_shield: add test application
This test application makes use of the RIOT Peripheral Selftest Shield,
which connects e.g. PWM to ADC or SPI MOSI to SPI MISO, UART TXD to RXD,
etc. This provides quick and fully automated self testing capabilities.

Please note that the simplicity and ease of use of the hardware comes
with a prices: There are whole classes of issues that cannot be detected
automatically. This test cannot replace other testing approaches
(such as manual testing or PHiLIP on the HiL), but only complement them.
2023-11-10 15:13:23 +01:00
Benjamin Valentin
d3dfd4baf0 periph/adc_continous: add test for ADC continous API 2023-11-10 12:10:49 +01:00
Gunar Schorcht
3769a21c1f tests/periph/fmc: remove a double empty line 2023-07-28 14:50:06 +02:00
Gunar Schorcht
6fdc6ef37e tests/periph/fmc: improve test app
To detect misconfigurations of addresses and sizes, the whole memory is filled word-wise with it's addresses. If the content doesn't match, it prints the address and the content.
f
2023-07-26 23:46:19 +02:00
Gunar Schorcht
ac4d5d4edc tests/drivers/stm_fmc: move test app to tests/periph/fmc 2023-07-26 09:02:11 +02:00
Hugues Larrive
3c465836f2 examples and tests: add atmega8 to relevent Makefile.ci
using dist/tools/insufficient_memory/add_insufficient_memory_board.sh
2023-07-11 21:22:02 +02:00
Marian Buschsieweke
ee79bb7d68
tests: update tests for MSP430 CPU
Using the builtin `__MSP430__` macro is fool-proof and stable even
if one would try to rename and reorganize the MSP430 cpu code.
2023-06-19 14:49:55 +02:00
Fabian Hüßler
117a901d6f tests/periph/pio: Add basic PIO test 2023-05-23 08:49:37 +02:00
da95d2c56c
treewide: replace occurrences of tests/periph_ with new path 2023-05-06 15:33:03 +02:00
c51d5357e6
tests: move periph_ applications to periphs subdirectory 2023-05-06 15:29:51 +02:00