Page 1 of 1

Burn esp32s3 efuses using jtag adapter

Posted: Tue Oct 18, 2022 11:07 pm
by chillboater
Hi I am working on a custom board using the esp32s3. The project is highly space constrained and as a result there is no room to provide a connection to the uart0 pins. Is there a way to burn efuses using just the usb-jtag or is espefuse.py only compatible with UART?

Re: Burn esp32s3 efuses using jtag adapter

Posted: Wed Oct 19, 2022 3:23 am
by ESP_Sprite
Do you mean the USB-serial-JTAG peripheral found in the ESP32S3? If so, that also has a serial interface (shows up like an UART when connected over USB) and pointing espefuse.py at that should simply work.

Re: Burn esp32s3 efuses using jtag adapter

Posted: Thu Oct 20, 2022 2:14 am
by chillboater
Unfortunately the port either doesn't show up or I get one of the following errors:

Code: Select all

c:/Espressif/frameworks/esp-idf-v4.4.2/components/esptool_py/esptool/espefuse.py --port COM8  burn_efuse STRAP_JTAG_SEL 1
Connecting......................................

A fatal error occurred: Failed to connect to Espressif device: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
or

Code: Select all

c:/Espressif/frameworks/esp-idf-v4.4.2/components/esptool_py/esptool/espefuse.py --port COM10  burn_efuse STRAP_JTAG_SEL 1
Traceback (most recent call last):
  File "c:\Espressif\frameworks\esp-idf-v4.4.2\components\esptool_py\esptool\espefuse.py", line 198, in <module>
    _main()
  File "c:\Espressif\frameworks\esp-idf-v4.4.2\components\esptool_py\esptool\espefuse.py", line 191, in _main
    main()
  File "c:\Espressif\frameworks\esp-idf-v4.4.2\components\esptool_py\esptool\espefuse.py", line 144, in main
    esp = get_esp(common_args.port,
  File "c:\Espressif\frameworks\esp-idf-v4.4.2\components\esptool_py\esptool\espefuse.py", line 61, in get_esp
    esp = esptool.ESPLoader.detect_chip(port, baud, connect_mode)
  File "c:\Espressif\frameworks\esp-idf-v4.4.2\components\esptool_py\esptool\esptool.py", line 363, in detect_chip
    detect_port = ESPLoader(port, baud, trace_enabled=trace_enabled)
  File "c:\Espressif\frameworks\esp-idf-v4.4.2\components\esptool_py\esptool\esptool.py", line 320, in __init__
    self._port = serial.serial_for_url(port)
  File "C:\Users\johne\AppData\Local\Programs\Python\Python39\lib\site-packages\serial\__init__.py", line 90, in serial_for_url
    instance.open()
  File "C:\Users\johne\AppData\Local\Programs\Python\Python39\lib\site-packages\serial\serialwin32.py", line 80, in open
    self._reconfigure_port()
  File "C:\Users\johne\AppData\Local\Programs\Python\Python39\lib\site-packages\serial\serialwin32.py", line 222, in _reconfigure_port
    raise SerialException(
serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: PermissionError(13, 'A device attached to the system is not functioning.', None, 31)
Both of these cases I can connect to the port with a serial port terminal app and see the output of whatever program I have running on the esp32-s3

Is there a specific program I need to load over jtag in order to set the UART functionality over USB to work correctly with espefuse.py?

Re: Burn esp32s3 efuses using jtag adapter

Posted: Fri Oct 21, 2022 5:00 am
by ESP_Sprite
Can you force the ESP into download mode by pulling IO0 low on startup?

Re: Burn esp32s3 efuses using jtag adapter

Posted: Mon Oct 24, 2022 7:40 pm
by chillboater
Thanks for you help, I was able to burn the efuse with a different computer. I guess one of the drivers I am using with VisualGDB was preventing the esp32 from being recognized as a serial device.

Re: Burn esp32s3 efuses using jtag adapter

Posted: Tue Jan 31, 2023 3:18 pm
by skanky
For anyone coming across this I've added a page on how to program the fuse at https://esp32developer.com/programming- ... rogramming