Open mjs513 opened 1 year ago
@mjs513 - I have the same issue with a different C3 module: https://www.amazon.com/dp/B0BWN14X65
I have also tried hooking it up to an RPI Pico board. running as a CMIS-DAP JTAG using https://github.com/ataradov/free-dap I have another Pico running the same software that talks to an Arduino MKRZero using swd mode. I believe the ESP32-C3 does not support SWD mode so I hooked it up with 4 signal wires: RPI pin ESP32_pin 11(SWCLK/TCK) -> GPIO6 12(SWDIO/TMS) -> GPIO4 13 TDI -> GPIO5 14 TDO -> GPIO7
So far they are not talking. It is unclear to me how to configure the IDE to support this?
@mjs513 your configuration is correct. Did you make sure that before starting debug you actually built and uploaded the sketch that you want to debug? This must be done any time you restart the IDE/reopen the sketch. Necessary because some files need to be copied to the sketch folder and ELF to be picked up by GDB. Use only the top 3 buttons of the IDE to compile and start debug.
@KurtE C3 has integrated JTAG. No external hardware or connections are necessary other than the USB port, as @mjs513 explained
@me-no-dev thanks for getting back to us so fast. The answer to your question is yes I uploaded the sketch first and then hit the debug button on the top of the IDE. As @KurtE said he tried it with a different board than I have as well as trying to use the JTAG connectors.
At this point do not know where to go from here. As you said it should work.
edit: Think whats bothering me is that its not seeing the debug port as a USB/JTAG port.
EDIT2: It might be related to https://github.com/espressif/arduino-esp32/pull/7295, followed the same procedure to update driver. it shows driver is installed but my x64 machine is not seeing it or not recognizing that the driver is associated the port.
@me-no-dev and @KurtE Tried using VSCode just to see if would recognize the port and upload and if failed with the same error. Its not seeing the usb cable attached to pins 18/19 as as seperate device. Only seeing one device on com8. From what I understand I should be seeing 2 com ports but I am not. If I try to install with have disk I am seeing:
@KurtE C3 has integrated JTAG. No external hardware or connections are necessary other than the USB port, as @mjs513 explained
Understood, but when the USB connection did not works, I thought I would try the other option. LIke what is described in: https://visualgdb.com/tutorials/esp32/esp32-c3/
Note some of their instructions for using the USB Port version:
Their cable made no sense to me as I believe they are the same pins that hook up to the actual USB connector:
Wondering when the board boots up and I open up the Serial Monitor window, I see a bunch of text messages: That appear like the keep repeating, with data like:
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0xf (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cf890
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5810,len:0x438
load:0x403cc710,len:0x91c
load:0x403ce710,len:0x25b0
entry 0x403cc710
If this is related with JTAG stuff or potentially some internal debug stuff that is outputting by default?
Thanks Kurt
Wondering when the board boots up and I open up the Serial Monitor window, I see a bunch of text messages: That appear like the keep repeating, with data like:
ESP-ROM:esp32c3-api1-20210207 Build:Feb 7 2021 rst:0x3 (RTC_SW_SYS_RST),boot:0xf (SPI_FAST_FLASH_BOOT) Saved PC:0x403cf890 SPIWP:0xee mode:DIO, clock div:1 load:0x3fcd5810,len:0x438 load:0x403cc710,len:0x91c load:0x403ce710,len:0x25b0 entry 0x403cc710
If this is related with JTAG stuff or potentially some internal debug stuff that is outputting by default?
@KurtE This is the ESP32-C3 bootloader messages. Not related to the debugging process.
Not sure if this pertains to the current issue or not. After some more googling I found this https://www.esp32.com/viewtopic.php?t=31380
basically it adds the following command arg to opencd:
-c "gdb_memory_map disable"
I would try to add it but not sure where to even give it a try.
Wondering when the board boots up and I open up the Serial Monitor window, I see a bunch of text messages: That appear like the keep repeating, with data ... If this is related with JTAG stuff or potentially some internal debug stuff that is outputting by default?
@KurtE This is the ESP32-C3 bootloader messages. Not related to the debugging process.
Thanks, today I have had some luck at least getting the debugger up. My ESP32-c3 board has external 4mb flash and I need to configure the flash to DIO mode instead of QIO mode.
Now at least the debugger comes up. Not sure what the configuration should be if the ESP32-c3 has internal flash. WIll hopefully find out soon, as other one(s) arrive in a few days.
Note, I don't think it is working overly well, as if you try to step or the like it sort of hangs or restarts... But at least it comes up.
Wonder if some of these issues are due to differences between Arm Cortex versus risc-v
I just found this related to wifi: https://github.com/espressif/esp-at/issues/615#issuecomment-1065018934
I just found this related to wifi: espressif/esp-at#615 (comment)
Arduino 2.0.9 uses IDF 4.4, therefore this fix is already included.
I just found this related to wifi: espressif/esp-at#615 (comment)
Arduino 2.0.9 uses IDF 4.4, therefore this fix is already included.
Thanks - need to make sure. But I just received a ESP32-C3 WROOM DevKitC-02 and connected it up and it works out of the box - the second serial port shows as USB Serial that pins 18/19 are connected with the USB cable so it has to be something with the board.
Just to close the loop I finally tracked down the issue with JTAG not working on this paticular board. Turns out its a hardware issue - pins18/19 are shorted together even though there does not seem to be a solder bridge on my soldering on the header pins. Pulled out my multimeter and tested. Tried it a different board (came in a package of three) and it worked so going to close out this issue.
@me-no-dev @mjs513 - I can start up the debugger on a couple of the different boards, but wondering does any of it actually work?
Once it starts up can you get it to set a breakpoint and have it be hit. And if it is hit, can you continue from this location? Can you use the step in and step over?
If I try to get the code to continue, the gdb-server panel starts producing lots of debug output. I am running the c3 devkit m...
And nothing beyond the startup appears to work for me.
I am probably missing something obvious. but wondering if any of the stuff works for you?
Kurt
@KurtE Just hooked the C3 up again (Espressif WROOM esp32-c3 devkit) and can confirm its doing the same thing for me as well. Yesterday I did not notice it.
I am running the BlinkRGB example with a extra Serial.print right before the endif. I hit continue button and I get
gdb_log_outgoing_packet(): [esp32c3] sending packet: $a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5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40000000000100004cbfc83f0000000000f0c83f00e000000000000000200060ee813840a5a5a5a5fc0000003c31c93f400000000000c93f0000c93f00e0000040af3840a4f8c83f94f8c83f6cbfc83fe46c3840ffffffffffffffffffffffffff00000000f0c83fffffffff6cbfc83f00de0000000200000002000020bfc83fb430384000000000000200006cbfc83f4a1d3840787538406e8c00420032c93f0ef0924dc495c83fffffffff94a5384000000000000000000000000000000000000000000080033c2041c93fc032c93f00f0c83f00f0c83f6441c93fe840c93fe263004200100000ffffffff000000000000000000100000500100000843c93fff00000000f0c83fffffffffffffffffffffffff180000001400000004080000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0ef0924d00180000a80100005400000000000000000000000000000000000000000000000080033c2041c93f0080033c00f0c83f6441c93fc032c93fe840c93f0a63004250f9c83f00000000000000000ef0924d1800000014000000001800000000c93f0000060000000000000038c04800c93f50f9c83f0000000050f9c83f869e384000f0c83f00000000e840c93f7856adba0000000000000000240000003aa138402800000024000000040800000000c93f0000060000000000000038c01843c93f6cf9cd3f000000006cf9cd3f869e38405006000080f9cd3f80f9cd3f7856adbad0ffcd3f00000000540100003aa13840580100005401000000180000fe263840da753840c6753840b033c93f00c2c83fc495c83f0e890540b8713840ffffffff00000000000000000100000001000000000000000100000000000c600000c93facfacd3fffff7f800000000000000000000000000000000000000000000000000000000000000000000000000000000000000200ffffffffffffffffffffffff0000000000000000000000000a7538400000000000000000000000000000000000000000a5a5a5a5a5a5a5a5a5a5a5a5#e2
in the GDB window. If I hit it again then the spew starts and goes on endlessly.
Here is the sketch I am using:
void setup() {
// No need to initialize the RGB LED
Serial.begin(115200);
}
// the loop function runs over and over again forever
void loop() {
#ifdef RGB_BUILTIN
digitalWrite(RGB_BUILTIN, HIGH); // Turn the RGB LED white
delay(1000);
digitalWrite(RGB_BUILTIN, LOW); // Turn the RGB LED off
delay(1000);
neopixelWrite(RGB_BUILTIN,RGB_BRIGHTNESS,0,0); // Red
delay(1000);
neopixelWrite(RGB_BUILTIN,0,RGB_BRIGHTNESS,0); // Green
delay(1000);
neopixelWrite(RGB_BUILTIN,0,0,RGB_BRIGHTNESS); // Blue
delay(1000);
neopixelWrite(RGB_BUILTIN,0,0,0); // Off / black
delay(1000);
Serial.println("end cycle");
#endif
}
also seems to break in setup at Serial.begin(115200) on the first continue button push and then on the second the infinite loop:
JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Reset cause (3) - (Software core reset)
Hardware assisted breakpoint 1 at 0x42000020: file D:\Users\Merli\Documents\Arduino\BlinkRGB_ESP32C3/BlinkRGB_ESP32C3.ino, line 20.
Note: automatically using hardware breakpoints for read-only addresses.
Program
received signal SIGINT, Interrupt.
0x4004c0d6 in ?? ()
[New Thread 1070463660]
[New Thread 1070154348]
[New Thread 1070145936]
[New Thread 1070151672]
[Switching to Thread 1070463660]
Thread 2 "loopTask" hit Temporary breakpoint 1, setup () at D:\Users\Merli\Documents\Arduino\BlinkRGB_ESP32C3/BlinkRGB_ESP32C3.ino:20
20 Serial.begin(115200);
@me-no-dev Can you please help with triage and possibly close this issue? Thanks
@VojtechBartoska we need to investigate all outcomes and provide a good info/tutorial on using JTAG with Arduino. The last message clearly states that the JTAG hit the setup()
breakpoint, but I suspect that the interface in the IDE did not update. There are different issues between the plugin versions used in the different IDE versions and also some on our side (openocd/gdb) that we have poked the relevant teams about, but seem unfixed still.
I want to make clear that we are mere users of what Espressif offers as OpenOCD/GDB and what Arduino.cc offers as IDE2+cortex-debug. Our configurations were vetted by the IDF team and should work as best as possible on the current platform. It's the nuances between the chips/architecture/interface that are most important to figure out and document. When using external debugger (as required for ESP32 and ESP32-S2) there are far less issues and debugging works much more as expected. Having the USB-JTAG internal, means that the interface gets restarted with the chip and more.
Board
ESP32-C3 Dev Board
Device Description
DIYmall NiceMCU-C3F V1.0 ESP32-C3
Hardware Configuration
RGB LED attached to GPIO8, GPIO5 and GPIO4.
GPIO18/19 attached to usb cable: GPIO18 D- to WTH on the cable GPIO19 D+ to GRN on the cable
Version
v2.0.9
IDE Name
Arduino IDE 2.1.1 nightly 20230529
Operating System
Windows 10 x64
Flash frequency
80Mz
PSRAM enabled
yes
Upload speed
921600
Description
For last week or so we have been trying to get Debug working using the Arduino IDE 2.x debugger with no luck. On setup is based on attacing a USB cable to pins IO18/19 with gnd to gnd and powering from the USB connector. This is based on the following: Configure ESP32-C3 built-in JTAG Interface
We also downloaded ESP-tools so we have the correct drivers install as we saw this: Arduino IDE 2.X Debug however even with the driver installed I am see this for the USB connected to D-/D_
When I went to manually install the driver it did not update so went in and tried a different way and gave me an error that said I needed the x64 driver???
GDB console shows the following error:
Sketch
Here is the entire log
espefuse.py v4.5.1 Connecting.... Detecting chip type... ESP32-C3
=== Run "summary" command === EFUSE_NAME (Block) Description = [Meaningful Value] [Readable/Writeable] (Hex Value)
Calibration fuses: TEMP_SENSOR_CAL (BLOCK2) Temperature calibration = -3.2 R/W (0b100100000) ADC1_MODE0_D2 (BLOCK2) ADC1 calibration 1 = -208 R/W (0xb4) ADC1_MODE1_D2 (BLOCK2) ADC1 calibration 2 = 356 R/W (0x59) ADC1_MODE2_D2 (BLOCK2) ADC1 calibration 3 = -44 R/W (0x8b) ADC1_MODE3_D2 (BLOCK2) ADC1 calibration 4 = 292 R/W (0x49) ADC2_MODE0_D2 (BLOCK2) ADC2 calibration 5 = -472 R/W (0xf6) ADC2_MODE1_D2 (BLOCK2) ADC2 calibration 6 = 296 R/W (0x4a) ADC2_MODE2_D2 (BLOCK2) ADC2 calibration 7 = -388 R/W (0xe1) ADC2_MODE3_D2 (BLOCK2) ADC2 calibration 8 = 32 R/W (0x08) ADC1_MODE0_D1 (BLOCK2) ADC1 calibration 9 = 44 R/W (0b001011) ADC1_MODE1_D1 (BLOCK2) ADC1 calibration 10 = 96 R/W (0b011000) ADC1_MODE2_D1 (BLOCK2) ADC1 calibration 11 = 52 R/W (0b001101) ADC1_MODE3_D1 (BLOCK2) ADC1 calibration 12 = 8 R/W (0b000010) ADC2_MODE0_D1 (BLOCK2) ADC2 calibration 13 = 0 R/W (0b000000) ADC2_MODE1_D1 (BLOCK2) ADC2 calibration 14 = 0 R/W (0b000000) ADC2_MODE2_D1 (BLOCK2) ADC2 calibration 15 = 0 R/W (0b000000) ADC2_MODE3_D1 (BLOCK2) ADC2 calibration 16 = 0 R/W (0b000000)
Config fuses: DIS_ICACHE (BLOCK0) Disables ICache = False R/W (0b0) DIS_DOWNLOAD_ICACHE (BLOCK0) Disables Icache when SoC is in Download mode = False R/W (0b0) DIS_FORCE_DOWNLOAD (BLOCK0) Disables forcing chip into Download mode = False R/W (0b0) DIS_CAN (BLOCK0) Disables the TWAI Controller hardware = False R/W (0b0) VDD_SPI_AS_GPIO (BLOCK0) Set this bit to vdd spi pin function as gpio = False R/W (0b0) BTLC_GPIO_ENABLE (BLOCK0) Enable btlc gpio = 0 R/W (0b00) POWERGLITCH_EN (BLOCK0) Set this bit to enable power glitch function = False R/W (0b0) POWER_GLITCH_DSENSE (BLOCK0) Sample delay configuration of power glitch = 0 R/W (0b00) DIS_DIRECT_BOOT (BLOCK0) Disables direct boot mode = False R/W (0b0) DIS_USB_SERIAL_JTAG_ROM_PRINT (BLOCK0) Disables USB-Serial-JTAG ROM printing = False R/W (0b0) UART_PRINT_CONTROL (BLOCK0) Sets the default UART boot message output mode = Enabled R/W (0b00) FORCE_SEND_RESUME (BLOCK0) Force ROM code to send a resume command during SPI = False R/W (0b0) bootduring SPI boot ERR_RST_ENABLE (BLOCK0) Use BLOCK0 to check error record registers = without check R/W (0b0) DISABLE_WAFER_VERSION_MAJOR (BLOCK0) Disables check of wafer version major = False R/W (0b0) DISABLE_BLK_VERSION_MAJOR (BLOCK0) Disables check of blk version major = False R/W (0b0) BLOCK_USR_DATA (BLOCK3) User data = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
Efuse fuses: WR_DIS (BLOCK0) Disables programming of individual eFuses = 0 R/W (0x00000000) RD_DIS (BLOCK0) Disables software reading from BLOCK4-10 = 0 R/W (0b0000000)
Flash Config fuses: FLASH_TPUW (BLOCK0) Configures flash startup delay after SoC power-up, = 0 R/W (0x0) unit is (ms/2). When the value is 15, delay is 7. 5 ms
Identity fuses: SECURE_VERSION (BLOCK0) Secure version (used by ESP-IDF anti-rollback feat = 0 R/W (0x0000) ure) MAC (BLOCK1) Factory MAC Address = 60:55:f9:25:c7:cc (OK) R/W WAFER_VERSION_MINOR_LO (BLOCK1) WAFER_VERSION_MINOR least significant bits = 3 R/W (0b011) PKG_VERSION (BLOCK1) Package version = 0 R/W (0b000) BLK_VERSION_MINOR (BLOCK1) BLOCK version minor = 1 R/W (0b001) WAFER_VERSION_MINOR_HI (BLOCK1) WAFER_VERSION_MINOR most significant bits = 0 R/W (0b0) WAFER_VERSION_MAJOR (BLOCK1) WAFER_VERSION_MAJOR = 0 R/W (0b00) OPTIONAL_UNIQUE_ID (BLOCK2) Optional unique 128-bit ID = 17 34 a4 98 f4 eb e6 3a 7a 48 96 74 c2 99 62 5b R/W BLK_VERSION_MAJOR (BLOCK2) BLOCK version major = With calibration R/W (0b01) CUSTOM_MAC (BLOCK3) Custom MAC Address = 00:00:00:00:00:00 (OK) R/W WAFER_VERSION_MINOR (BLOCK0) calc WAFER VERSION MINOR = WAFER_VERSION_MINOR_HI = 3 R/W (0x3) << 3 + WAFER_VERSION_MINOR_LO (read only)
Jtag Config fuses: SOFT_DIS_JTAG (BLOCK0) Software disables JTAG. When software disabled, JT = 0 R/W (0b000) AG can be activated temporarily by HMAC peripheral DIS_PAD_JTAG (BLOCK0) Permanently disable JTAG access via pads. USB JTAG = False R/W (0b0) is controlled separately.
Security fuses: DIS_DOWNLOAD_MANUAL_ENCRYPT (BLOCK0) Disables flash encryption when in download boot mo = False R/W (0b0) des SPI_BOOT_CRYPT_CNT (BLOCK0) Enables encryption and decryption, when an SPI boo = Disable R/W (0b000) t mode is set. Enabled when 1 or 3 bits are set,di sabled otherwise SECURE_BOOT_KEY_REVOKE0 (BLOCK0) If set, revokes use of secure boot key digest 0 = False R/W (0b0) SECURE_BOOT_KEY_REVOKE1 (BLOCK0) If set, revokes use of secure boot key digest 1 = False R/W (0b0) SECURE_BOOT_KEY_REVOKE2 (BLOCK0) If set, revokes use of secure boot key digest 2 = False R/W (0b0) KEY_PURPOSE_0 (BLOCK0) KEY0 purpose = USER R/W (0x0) KEY_PURPOSE_1 (BLOCK0) KEY1 purpose = USER R/W (0x0) KEY_PURPOSE_2 (BLOCK0) KEY2 purpose = USER R/W (0x0) KEY_PURPOSE_3 (BLOCK0) KEY3 purpose = USER R/W (0x0) KEY_PURPOSE_4 (BLOCK0) KEY4 purpose = USER R/W (0x0) KEY_PURPOSE_5 (BLOCK0) KEY5 purpose = USER R/W (0x0) SECURE_BOOT_EN (BLOCK0) Enables secure boot = False R/W (0b0) SECURE_BOOT_AGGRESSIVE_REVOKE (BLOCK0) Enables aggressive secure boot key revocation mode = False R/W (0b0) DIS_DOWNLOAD_MODE (BLOCK0) Disables all Download boot modes = False R/W (0b0) ENABLE_SECURITY_DOWNLOAD (BLOCK0) Enables secure UART download mode (read/write flas = False R/W (0b0) h only) BLOCK_KEY0 (BLOCK4) Purpose: USER Encryption key0 or user data = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W BLOCK_KEY1 (BLOCK5) Purpose: USER Encryption key1 or user data = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W BLOCK_KEY2 (BLOCK6) Purpose: USER Encryption key2 or user data = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W BLOCK_KEY3 (BLOCK7) Purpose: USER Encryption key3 or user data = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W BLOCK_KEY4 (BLOCK8) Purpose: USER Encryption key4 or user data = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W BLOCK_KEY5 (BLOCK9) Purpose: USER Encryption key5 or user data = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W BLOCK_SYS_DATA2 (BLOCK10) System data (part 2) = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
Spi_Pad_Config fuses: SPI_PAD_CONFIG_CLK (BLOCK1) SPI CLK pad = 0 R/W (0b000000) SPI_PAD_CONFIG_Q (BLOCK1) SPI Q (D1) pad = 0 R/W (0b000000) SPI_PAD_CONFIG_D (BLOCK1) SPI D (D0) pad = 0 R/W (0b000000) SPI_PAD_CONFIG_CS (BLOCK1) SPI CS pad = 0 R/W (0b000000) SPI_PAD_CONFIG_HD (BLOCK1) SPI HD (D3) pad = 0 R/W (0b000000) SPI_PAD_CONFIG_WP (BLOCK1) SPI WP (D2) pad = 0 R/W (0b000000) SPI_PAD_CONFIG_DQS (BLOCK1) SPI DQS pad = 0 R/W (0b000000) SPI_PAD_CONFIG_D4 (BLOCK1) SPI D4 pad = 0 R/W (0b000000) SPI_PAD_CONFIG_D5 (BLOCK1) SPI D5 pad = 0 R/W (0b000000) SPI_PAD_CONFIG_D6 (BLOCK1) SPI D6 pad = 0 R/W (0b000000) SPI_PAD_CONFIG_D7 (BLOCK1) SPI D7 pad = 0 R/W (0b000000)
Usb Config fuses: DIS_USB_JTAG (BLOCK0) Disables USB JTAG. JTAG access via pads is control = False R/W (0b0) led separately DIS_USB_DEVICE (BLOCK0) Disables USB DEVICE = False R/W (0b0) USB_EXCHG_PINS (BLOCK0) Exchanges USB D+ and D- pins = False R/W (0b0) DIS_USB_SERIAL_JTAG_DOWNLOAD_MODE (BLOCK0) Disables USB-Serial-JTAG download feature in UART = False R/W (0b0) download boot mode
Wdt Config fuses: WDT_DELAY_SEL (BLOCK0) Selects RTC WDT timeout threshold at startup = False R/W (0b0)
PS D:\Espressif\frameworks\esp-idf-v5.0.2>