tests/adc: always test all resolutions#21223
Merged
mguetschow merged 1 commit intoRIOT-OS:masterfrom Feb 20, 2025
Merged
Conversation
5 tasks
mguetschow
approved these changes
Feb 20, 2025
Contributor
mguetschow
left a comment
There was a problem hiding this comment.
Thanks, changes are straightforward enough and confirmed to work as expected on a BOARD=nrf52840dk.
Contributor
Author
|
That was quick, thank you :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
During my work on the STM32 ADC, I struggled with the original
tests/periph/adctest, since it only samples at 10 bit and has to be recompiled for different resolutions.The changes were already discussed in #20780.
Testing procedure
Get your favorite devboard with an ADC (some STM32s like F0,G0,C0 might show weird values due to #21222) and run the test with
BOARD=nucleo-l073rz make -C tests/periph/adc flash term.You should see the new output from the test with all resolutions. Keep a jumper wire at hand to set the analog inputs to ground and VCC to see that they are at the appropriate values.
This is the new output with this PR:
This is the output from current master:
Issues/PRs references
See also #20780.