Skip to content

board pins initialization? #10233

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

Closed
stanelie opened this issue Apr 8, 2025 · 4 comments
Closed

board pins initialization? #10233

stanelie opened this issue Apr 8, 2025 · 4 comments
Labels
Milestone

Comments

@stanelie
Copy link

stanelie commented Apr 8, 2025

Hello.
Not sure if this is a bug report or a feature request, but I was wondering if there is a way to prevent IO pins from changing state randomly while the device boots?

I use these ESP32-S3-Zero boards to build wireless light sources, I use 4 pins as PWM outputs to drive some LED drivers. While the ESP32 boots circuitpython, before my program runs, the pins go through a cicle of full on - full off, which makes my LEDs go full on while the ESP boots. In my case, in a professional theater context, this is undesired behavior. Also, when I experience low power conditions, when the battery is drained, the ESP32 reboots constantly, which makes the LED blink on each cycle, which is even worse. Is there a way to avoid this (without having to add component to physically enable the outputs only when the device is properly booted)?

Thanks!

@stanelie stanelie added the bug label Apr 8, 2025
@dhalbert dhalbert added this to the Support milestone Apr 8, 2025
@dhalbert
Copy link
Collaborator

dhalbert commented Apr 8, 2025

The pins may be going from unconnected to pulled up. The default reset state for a pin is to enable the internal pullup, which is roughly 50 kohms: this minimizes power draw, believe it or not. We used to reset the pins to float, but changed it to the standard reset state several years ago.

I think the reliable thing to do here is to put a stronger external pull-down resistor on these pins, like 10k. That will ensure that pin fluctuations during restart don't affect your outputs.

@stanelie
Copy link
Author

stanelie commented Apr 8, 2025

Oh!
That's a great idea, and it won't need too many extra components. I like this!

Thanks!!

@dhalbert dhalbert closed this as completed Apr 8, 2025
@dhalbert
Copy link
Collaborator

dhalbert commented Apr 8, 2025

Let us know if you are still seeing glitches after that!

@stanelie
Copy link
Author

stanelie commented Apr 8, 2025

Very nice! It works perfectly!

Thanks again!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants