3

I'm unsure how I can program an ESP32-S3 without using the UART interface it has. In the past I always used a USB to UART converter and then I could flash the device over USB automatically, but could not use the JTAG for debugging:

Previous Flasher: enter image description here

Now I would like to use directly the USB (IO19 and IO20), but I'm unsure if I can flash the device with that and how I can trigger a reset automatically without always pressing a reset button, like in the above schematic. Has anyone already experience with that?

Planed (D- to IO19, D+ to IO20): enter image description here

Datasheet ESP32-S3: https://media.digikey.com/pdf/Data%20Sheets/Espressif%20PDFs/ESP32-S3-WROOM-1_1U_v0.5.1_Preliminary.pdf

HansPeterLoft
  • 1,038
  • 1
  • 22
  • 40
  • Yes, you can upload firmware via JTAG. Connection should be easy for D+/D-. You might need to have a look at the strapping pins to ensure the correct JTAG controller is activated. See https://www.espressif.com/sites/default/files/documentation/esp32-s3_hardware_design_guidelines_en.pdf, chapter 2.8. If your firmware doesn't accidentally disable the JTAG controller, reset through JTAG should be possible at any time. – Codo Jul 19 '22 at 12:42

1 Answers1

2

On the datasheet you have attached in page 25 there's an implementation for a JTAG interface that you can use as a reference.

enter image description here

Besides that, the ESP32 has an eFuse that can enable or disable the Jtag, make sure it's not disabled.

If you intend to debug using Jtag I would strongly recommend reading this article It's a little old but sadly it's relevant.

Finally some extra advice by me: Make sure the supply voltage is stable, I have spent countless hours with gdb not being able to find the ESP due to power drops. Adding 3 10uF capacitors in the power supply seemed to help.

Edit:

This specific chip has an internal JTAG interface, to access it you would need special USB drivers, here's a relevant article, I hope it can be useful.

The eFuse should be set to the internal JTAG by default, but just in case you can use the esptool.py to check, here's some instructions

  • 1
    Yes, I know this separate JTAG interface, but this is only for external JTAG and it looks like the internal JTAG can directly be used over the USB OTG and the fuses are also set for that at initial startup – HansPeterLoft Jul 19 '22 at 09:12
  • I edited the answer, let me know if that covers you. – Nick Gkloumpos Jul 19 '22 at 12:41