espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
12.97k stars 7.11k forks source link

ESP32-S3: Permanently disabling USB-JTAG controller (IDFGH-12995) #13946

Open benjaminaigner opened 1 month ago

benjaminaigner commented 1 month ago

Answers checklist.

General issue report

Following problem: On some Win11 machines, the USB-OTG interface is kicked out, because of the sudden changes between the USB-OTG & USB-JTAG/serial interfaces in the ESP32-S3.

So I thought disabling it via eFuses:

But: since then, my chip is bricked. Entering the UART0 download mode results in an immediate core panic, without the possibility to recover:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x0 (DOWNLOAD(USB/UART0))
waiting for download
uru Meditation Error: Core 0 panic'ed (LoadProhibited)
Core 0 register dump:
PC      : 0x400511b1  PS      : 0x00060330  A0      : 0x80049188  A1      : 0x3fceb640
A2      : 0x00000000  A3      : 0x3ff1e3fb  A4      : 0x00000001  A5      : 0x00000000
A6      : 0x00000000  A7      : 0x00000088  A8      : 0x800533dc  A9      : 0x3fceb620
A10     : 0xfffffffb  A11     : 0x3fceeebc  A12     : 0x3fceefbc  A13     : 0x00000000
A14     : 0x00000000  A15     : 0x00000006  SAR     : 0x0000001f  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000  LBEG    : 0x400570e8  LEND   : 0x400570f3  LCOUNT  : 0x00000000

Backtrace: 0x400511b1:0x3fceb640 0x40049185:0x3fceb670 0x400491e5:0x3fceb690 0x40043917:0x3fceb6b0 0x4004392a:0x3fceb6d0 0x40043c33:0x3fceb6f0 0x40034c45:0x3fceb710

I found no information in the documentation that this setting can brick my chip, maybe this is just related to the bootloader code.

Please provide instructions how to permanently disable the USB Serial/JTAG controller in the chip and if possible how to unbrick my ESP32-S3.

Thank you very much, keep up with the good work!

igrr commented 1 month ago

Hi @benjaminaigner, so far I can only say that this indeed seems to be a bug in the boot ROM. We do have an internal issue report about it, but we only met this once and didn't pursue debugging the issue.

I'm afraid there probably isn't a way to get the chip back to the working state, you'll have to use a new one.

We'll confirm which eFuse is sufficient to disable USB Serial/JTAG (I think it's DIS_USB_SERIAL_JTAG) and get back to you.

terrafirma2021 commented 3 weeks ago

Hi, just wanted to raise this issue once again. ESP32-S3-DevKitC-1 v1.1

espefuse.py --port COM7 burn_efuse DIS_USB_JTAG = Does not disable usb jtag on the esp32 s3 dev kit usb port (not the uart)

espefuse.py --port COM7 burn_efuse DIS_USB_SERIAL_JTAG = disables the esp32 from being able to be flashed message: Download mode successfully detected, but getting no sync reply: The serial TX path seems to be down.

terrafirma2021 commented 2 weeks ago

@igrr

Can you kindly confirm the correct efuse to burn please, Thanks