Skip to content

tests/periph/selftest_shield: improve SPI test#20089

Merged
maribu merged 1 commit intoRIOT-OS:masterfrom
maribu:tests/periph/selftest_shield2
Nov 16, 2023
Merged

tests/periph/selftest_shield: improve SPI test#20089
maribu merged 1 commit intoRIOT-OS:masterfrom
maribu:tests/periph/selftest_shield2

Conversation

@maribu
Copy link
Copy Markdown
Member

@maribu maribu commented Nov 15, 2023

Contribution description

  • 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

Testing procedure

This should fix the failure of the test on the Nucleo-F446RE.

Issues/PRs references

None

- 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
@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: tests Area: tests and testing framework Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Nov 15, 2023
@riot-ci
Copy link
Copy Markdown

riot-ci commented Nov 15, 2023

Murdock results

✔️ PASSED

af6bb03 tests/periph/selftest_shield: improve SPI test

Artifacts

@maribu maribu added this pull request to the merge queue Nov 16, 2023
Merged via the queue into RIOT-OS:master with commit 4e7f972 Nov 16, 2023
@maribu maribu deleted the tests/periph/selftest_shield2 branch November 16, 2023 18:09
@maribu
Copy link
Copy Markdown
Member Author

maribu commented Nov 16, 2023

Thx :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants