Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/periph/selftest_shield: improve SPI test #20089

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

maribu
Copy link
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

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
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