hello,
On the ESP32C3 it seems that GPIO 20 and 21 are blocked if USB serial (which runs on GPIO18 and 19) is used (USB HWCDC).
None of the GUI screens allows you to touch GPIO 20 and 21.
A work around is to uncheck "Enable Serial Port Console", now you can do everything with GPIO 20,21, after that Enable the Serial Port again.
I tested this on a custom build by Visual Studio, based on the sources mega-20240414.
cheers, Stef
ESP32C3, GPIO 20,21 are blocked when Serial Console over USB is enabled
Moderators: grovkillen, Stuntteam, TD-er
Re: ESP32C3, GPIO 20,21 are blocked when Serial Console over USB is enabled
That's correct, and working as intended (AFAICS)
When looking at the GPIO pins for ESP32-C3 these pins are reserved for RX and TX, but as a lot of C3 boards come without a serial chip installed, you can disable the serial fall-back to make these pins available for other uses.

When looking at the GPIO pins for ESP32-C3 these pins are reserved for RX and TX, but as a lot of C3 boards come without a serial chip installed, you can disable the serial fall-back to make these pins available for other uses.
/Ton (PayPal.me)
Re: ESP32C3, GPIO 20,21 are blocked when Serial Console over USB is enabled
I don't understand your "intended"
I have
- Serial Port = "USB HWCDC" (thus using GPIO 18,19)
- Serial Fallback to Serial 0 = unchecked
So there's no need at all to block GPIO 20, 21
I have
- Serial Port = "USB HWCDC" (thus using GPIO 18,19)
- Serial Fallback to Serial 0 = unchecked
So there's no need at all to block GPIO 20, 21
Re: ESP32C3, GPIO 20,21 are blocked when Serial Console over USB is enabled
Ah, so probably it needs a small fix there. I'll have a look soon.
Update: That still was a TODO in the code... Adding the code now.
Update: That still was a TODO in the code... Adding the code now.
/Ton (PayPal.me)
Re: ESP32C3, GPIO 20,21 are blocked when Serial Console over USB is enabled
@Stef I've created PR #5101 to solve this open TODO.
A GH Actions run is busy building binaries, you can download a matching build from there for testing (you'll need a free Github account to be able to download). Please report your findings here.
A GH Actions run is busy building binaries, you can download a matching build from there for testing (you'll need a free Github account to be able to download). Please report your findings here.
/Ton (PayPal.me)
Re: ESP32C3, GPIO 20,21 are blocked when Serial Console over USB is enabled
Nope, thats\'s not the work-around.Stef wrote: ↑10 Aug 2024, 23:43 hello,
On the ESP32C3 it seems that GPIO 20 and 21 are blocked if USB serial (which runs on GPIO18 and 19) is used (USB HWCDC).
None of the GUI screens allows you to touch GPIO 20 and 21.
A work around is to uncheck "Enable Serial Port Console", now you can do everything with GPIO 20,21, after that Enable the Serial Port again.
I tested this on a custom build by Visual Studio, based on the sources mega-20240414.
cheers, Stef
You need to select "HW Serial 0" instead of "USB HWCDC" and you may also uncheck "Fallback to Serial 0", but that should not matter if you already have set the main serial port for the console to Serial0.
As long as you have HWCDC (or USBCDC on the ESP32-S2) selected, the USB interface is started at boot and thus those pins will not work the same as when you have not selected them for the console.
Who is online
Users browsing this forum: No registered users and 16 guests