-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Espressif: GPIOs default state is HIGH #5931
Comments
Yes, I did this deliberately in #5892 to keep the pins from floating (specifically neopixel pins.) Perhaps we need to special case on-board LED pins. |
As noted in #5679:
So maybe the solution is to default all the pins to input mode, instead of defaulting to high? I think this is more like SAMD, etc., where the default state is input. |
Setting pins to input mode is a higher power consumption than a pull. See https://www.st.com/resource/en/application_note/dm00315319-stm32-gpio-configuration-for-hardware-settings-and-low-power-consumption-stmicroelectronics.pdf chapter 6. Floating pins with input enabled will randomly flicker the input buffer on and off and consume power. It's better to pull each pin that is unused. However, for cases like this, I think we want to have boards dictate whether pins are pulled high or low. |
Another side effect of the default high is that, at least on the MagTag, it cycles the speaker amp, which causes clicking and a quiet hum. |
In some discord discussion, @tannewt suggested that we needed to be able to special-case certain pins, for reasons such as the above. |
This allows board code to override the default pull up reset state. It is useful for pins that are already externally connected, pulled or otherwise used by the board. Fixes #5931
CircuitPython version
Code/REPL
Behavior
I noticed that the on-board led was dimly lit and on further investigation, I found that the GPIOs were at ~3.2V.
Description
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: