-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Unable to configure pin 18 & 19 as GPIO output in ESP32C3 #12479
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
Comments
@pbdaran We changed the firmware to enable the USB serial/jtag interface by default. Originally we didn't enable this because the engineering sample chips didn't support it. This is on pins 18 & 19 (which are the D+/D- pins for the USB interface). You can override this (to disable it again) by setting |
Thank you, @jimmo! |
@jimmo Have you figured out a way to go about this with the s3? I've tried a few solutions including this one and the closest I've come is logging a ton of external interference on gpio 19, but no control over it. |
I am using ESP-IDF v5.2.2 and micropython version v5.2 for ESP32C3. After flashing the firmware.bin, I tried to configure the pins 18 and 19 as GPIO output. But getting an error as invalid pins. I set CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=n in boards/ESP32_GENERIC_C3/sdkconfig.c3usb` and set #define MICROPY_HW_ESP_USB_SERIAL_JTAG 0 in mpconfigport.h file, Also, Tried commenting out below lines in - /mpconfigport.h but still getting error as invalid pins. How can i resolve this issue and configure the pins 18 and 19 as GPIO output. |
I figure it out. You need to configure those pins as input with a pull-up resistor, as per https://gitlab.com/tidklaas/hip-badge/-/blob/4e7ef0a6cbe69c84d8b86f08941768e6e8785b10/firmware/blinkenlights/main/control.c#L422-424 To flash is a pain. I wrote the instructions at https://github.com/fortuna/ESPHomeBadge?tab=readme-ov-file#known-flashing-issue. |
I compiled the micropython code by cloning it from github, for ESP32C3. After flashing the firmware.bin, I tried to configure the pins 18 and 19 as GPIO output. But getting an error as invalid pins.
I did the same procedure few weeks back and it was all fine then.
Is it caused by any recent changes in micropython?
The text was updated successfully, but these errors were encountered: