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/uart: minor improvements #21009

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

mguetschow
Copy link
Contributor

Contribution description

The UART self-test using a TX-RX-loop fails on master. Luckily it's not a bug in the UART driver, but just a timing issue between uart_write returning and the HW triggering the RX callback. This PR fixes the test by adding a 1ms delay between TX and RX buffer check.

While at it, I also improved the error handling and reporting in the test.

Testing procedure

make -C tests/periph/uart BOARD=nrf52840dk flash term, then test 1 fails on master and succeeds with these changes.

Issues/PRs references

Encountered while testing for #20980

@github-actions github-actions bot added the Area: tests Area: tests and testing framework label Nov 19, 2024
@benpicco benpicco requested a review from maribu November 19, 2024 14:09
@mguetschow mguetschow added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Nov 19, 2024
@riot-ci
Copy link

riot-ci commented Nov 19, 2024

Murdock results

✔️ PASSED

d3133c5 tests/periph/uart: wait 1ms for HW to trigger RX irq during self-test

Success Failures Total Runtime
44 0 44 01m:24s

Artifacts

@maribu maribu added this pull request to the merge queue Nov 20, 2024
Merged via the queue into RIOT-OS:master with commit 7c44228 Nov 20, 2024
27 checks passed
@mguetschow
Copy link
Contributor Author

Thanks for your help!

@mguetschow mguetschow deleted the tests-uart-wait-for-rx branch November 21, 2024 11:44
@MrKevinWeiss MrKevinWeiss added this to the Release 2025.01 milestone Jan 20, 2025
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants