-
Notifications
You must be signed in to change notification settings - Fork 2.1k
cpu/stm32/periph_gpio: reset PU/PD for ADC channels #19574
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
cpu/stm32/periph_gpio: reset PU/PD for ADC channels #19574
Conversation
PU/PD configuration has to be `0b00` for analog outputs which is corresponds to the reset state. However, if the GPIO is not in reset state but was used digital input/output with any pull resistor, the PU/PD configuration has also to be reset to work as ADC channel.
bors merge |
19568: tests: move remaining driver related applications to tests/drivers r=aabadie a=aabadie 19574: cpu/stm32/periph_gpio: reset PU/PD for ADC channels r=maribu a=gschorcht ### Contribution description This PR provides a small fix that is relevant when a GPIO has been used as input/output with a pull resistor before it is initialized as an ADC channel. The PU/PD configuration has to be `0b00` for analog outputs which is corresponds to the reset state. However, if the GPIO is not in the reset state but was used digital input/output with any pull resistor, the PU/PD configuration has also to be reset to use it as ADC channel. ### Testing procedure - Green CI - The `periph_adc` test application should still work for any board that supports the `periph_adc` feature. ### Issues/PRs references Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr> Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Build failed (retrying...): |
19574: cpu/stm32/periph_gpio: reset PU/PD for ADC channels r=maribu a=gschorcht ### Contribution description This PR provides a small fix that is relevant when a GPIO has been used as input/output with a pull resistor before it is initialized as an ADC channel. The PU/PD configuration has to be `0b00` for analog outputs which is corresponds to the reset state. However, if the GPIO is not in the reset state but was used digital input/output with any pull resistor, the PU/PD configuration has also to be reset to use it as ADC channel. ### Testing procedure - Green CI - The `periph_adc` test application should still work for any board that supports the `periph_adc` feature. ### Issues/PRs references Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Build failed: |
What?
Was there a toolchain update and build in |
Ah, yes. And the fix is already there: #19577 |
bors merge |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Thanks. |
Contribution description
This PR provides a small fix that is relevant when a GPIO has been used as input/output with a pull resistor before it is initialized as an ADC channel.
The PU/PD configuration has to be
0b00
for analog outputs which is corresponds to the reset state. However, if the GPIO is not in the reset state but was used digital input/output with any pull resistor, the PU/PD configuration has also to be reset to use it as ADC channel.Testing procedure
periph_adc
test application should still work for any board that supports theperiph_adc
feature.Issues/PRs references