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

davidbeccue
Posts: 6
Joined: Mon Dec 27, 2021 3:25 pm

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

Postby davidbeccue » Fri Jan 27, 2023 5:40 pm

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)?

davidbeccue
Posts: 6
Joined: Mon Dec 27, 2021 3:25 pm

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

Postby davidbeccue » Mon Jan 30, 2023 4:17 pm

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?

ESP_Sprite
Posts: 8884
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » Tue Jan 31, 2023 8:42 am

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.

davidbeccue
Posts: 6
Joined: Mon Dec 27, 2021 3:25 pm

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

Postby davidbeccue » Tue Jan 31, 2023 2:20 pm

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?

ESP_Sprite
Posts: 8884
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » Wed Feb 01, 2023 2:36 am

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.)

Who is online

Users browsing this forum: MicroController and 67 guests