Sharing IO pins – UART

You need the two UART pins available for programming use (if you’re not using the ESP32 USB interface) even if you want to use the JTAG interface (you need to fall back to the serial interface at times, its the default means of programming the ESP32). You can share them with other bits of your circuit just as long as you can still use them for programming as and when needed.

You will probably want them available for debug output via print() during development work too.

Sharing IO pins – JTAG

When you are using the pins for the JTAG your application must not drive them. There is no automatic taking over of the pins by the ESP32, when the application is programmed and run, if it turns the pins into outputs then the JTAG interface will be destroyed and you’ll need to re-program a new version without the pins used (or erase the program) via the UART interface to get the JTAG interface back.

Some ESP32 devices (e.g. ESP32S3) default to JTAG assignment of the IO pins via the IO matrix and the pins won’t work as genernal IO until you call gpio_reset_pin() – see here.

We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.


Your email address will not be published. Required fields are marked *