Burn esp32s3 efuses using jtag adapter

chillboater
Posts: 3
Joined: Tue Oct 18, 2022 11:02 pm

Burn esp32s3 efuses using jtag adapter

Postby chillboater » Tue Oct 18, 2022 11:07 pm

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?

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

Re: Burn esp32s3 efuses using jtag adapter

Postby ESP_Sprite » Wed Oct 19, 2022 3:23 am

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.

chillboater
Posts: 3
Joined: Tue Oct 18, 2022 11:02 pm

Re: Burn esp32s3 efuses using jtag adapter

Postby chillboater » Thu Oct 20, 2022 2:14 am

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?

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

Re: Burn esp32s3 efuses using jtag adapter

Postby ESP_Sprite » Fri Oct 21, 2022 5:00 am

Can you force the ESP into download mode by pulling IO0 low on startup?

chillboater
Posts: 3
Joined: Tue Oct 18, 2022 11:02 pm

Re: Burn esp32s3 efuses using jtag adapter

Postby chillboater » Mon Oct 24, 2022 7:40 pm

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.

skanky
Posts: 20
Joined: Mon Nov 21, 2022 12:58 pm

Re: Burn esp32s3 efuses using jtag adapter

Postby skanky » Tue Jan 31, 2023 3:18 pm

For anyone coming across this I've added a page on how to program the fuse at https://esp32developer.com/programming- ... rogramming

Who is online

Users browsing this forum: Google [Bot], ok-home and 112 guests