Page 1 of 1

how to load code without usb or uart by using jtag?

Posted: Fri Jan 27, 2023 5:40 pm
by davidbeccue
We are building a custom board using esp32-s3. We are already using all the UART pins as well as USB pins. So we thought we'd just connect GPIO39-42 for external jtag. But now it looks like we have to blow EFUSE_STRAP_JTAG_SEL=1 in order to get the external jtag to work.

Is this right?

Does this mean that we MUST load code initially using usb or uart0 (in order to blow that efuse to subsequently use jtag)?

Re: how to load code without usb or uart by using jtag?

Posted: Mon Jan 30, 2023 4:17 pm
by davidbeccue
Actually, the more I look at docs, the more confused I become. Now I'm thinking that I can't even flash code at all using UART0. Is that right? It's only possible to flash your initial code via USB CDC before the efuse is blown for jtag IO39-42 ?

I'm led to believe that because of https://docs.espressif.com/projects/esp ... ction.html
where the note says "The ESP32-S3 supports only USB CDC and JTAG."

Can RX/TX of the UART0 be used for flashing code initially?

Re: how to load code without usb or uart by using jtag?

Posted: Tue Jan 31, 2023 8:42 am
by ESP_Sprite
Yes, UART0 can be used for flashing code (and/or blowing fuses using espefuse.py). I think that that remark you mentioned is an artifact of modifying the ESP32C3 docs to the ESP32-S3, and the remark out of context is kinda meaningless. I'll ask the docs team to change it.

Re: how to load code without usb or uart by using jtag?

Posted: Tue Jan 31, 2023 2:20 pm
by davidbeccue
That makes sense. Thanks.

Can you also confirm that jtag (IO39-42) is not possible on the s3 until after I connect via UART0 or USB CDC to blow an efuse?
Do I understand that correctly?

Re: how to load code without usb or uart by using jtag?

Posted: Wed Feb 01, 2023 2:36 am
by ESP_Sprite
Yes, this is correct. (You could also switch the JTAG port to GPIOs in the application running on the ESP, but that also requires a flash over USB-serial-JTAG or UART first.)