-
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
Initial pin states after power up (ESP32-S2) #8066
Comments
The default pin reset code provided by the ESP-IDF resets the pins with pull-up (instead of floating). According to the documentation, this minimizes power consumption. It also prevents glitches on external pins that might trigger NeoPixels, etc. This is discussed in the comments in #5931. |
@dhalbert, thank you for pointing me to the right direction. This is not good because the board always goes into DFU mode on single reset if |
In CircuitPython espressif port, we have a special case for what Adafruit terms the "double tap pin": // _reset_pin in common-hal/microcontroller/Pin.c
#ifdef DOUBLE_TAP_PIN
// Pull the double tap pin down so that resets come back to CircuitPython.
pull_down = pull_down || pin_number == DOUBLE_TAP_PIN->number;
#endif I do not know if this is equivalent to the functionality on this board; there's also |
Amazing, thanks so much for the in-depth look at this issue. |
@T94T is the |
Ok, got it. The |
CircuitPython version
Adafruit CircuitPython v8.1.0 available from official download page
and
Custom compiled Adafruit CircuitPython v8.2.0
Code/REPL
# no custom code (just the factory default code.py file)
Description
I have noticed that all pins output 3.3V after a power up. Presumably the internal pull-ups have been activated by default. So I ask here where this is defined in the source code of CircuitPython. Is this intentional or a bug?
This is my setup and procedure:
Hardware:
Lolin S2 Mini
(based onESP32-S2FN4R2
)Step 1: Uploaded an "empty" script compiled with arduino-esp32 (v2.0.6) and all pins remained in input state (0V).
Step 2: Burned the TinyUF2 bootloader. The board stays in DFU mode and all pins remain in input state (0 V).
Step 3: Uploaded CircuitPython (UF2 binary, v8.1.0 and also custom compiled v8.2.0). After reset and waiting for CircuitPython to fully boot, all pins output 3.3V.
Additional information / Update
I tried the above with an
ESP32-S3-DevKitM-1-N8R2
with exactly the same behaviour.The text was updated successfully, but these errors were encountered: