ESP32-C3 USB/JTAG not working after software reboot

arnytrty
Posts: 7
Joined: Sun Feb 13, 2022 5:31 pm

ESP32-C3 USB/JTAG not working after software reboot

Postby arnytrty » Sun Feb 13, 2022 6:57 pm

Hi, recently I created a small ESP32-C3 devboard. I flashed the hello world example and found out that whenever the board restarts, I loose ability to see anything on the USB/JTAG serial. So I also connected serial line to UART and found out, it worked well..

This is bootloader log when I plug it to computer

Code: Select all

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x1 (POWERON),boot:0xd (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0xe3c
load:0x403ce000,len:0x6dc
load:0x403d0000,len:0x28c4
entry 0x403ce000
The board says hello world, do the countdown and restarts (visible in the UART and the USB/JTAG), but after the restart the USB/JTAG stops so I cant see anything (last message: Restarting now.). The UART is still responsible and it looks like the board is doing fine (keep saying hello world, waiting, restarting).

This is bootloader log when board soft reset (aquired from UART):

Code: Select all

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0xc (RTC_SW_CPU_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
Saved PC:0x403806dc
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0xe3c
load:0x403ce000,len:0x6dc
load:0x403d0000,len:0x28c4
entry 0x403ce000
What is the problem? Everything about the board is on github: https://github.com/arnytrty/DevC3.
There is also another problem with wifi, but I will create another post for it
Last edited by arnytrty on Mon Feb 14, 2022 9:03 am, edited 1 time in total.

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

Re: ESP32-C3 USB/JTAG not working after software reboot

Postby ESP_Sprite » Mon Feb 14, 2022 1:17 am

What ESP-IDF version is this with?

arnytrty
Posts: 7
Joined: Sun Feb 13, 2022 5:31 pm

Re: ESP32-C3 USB/JTAG not working after software reboot

Postby arnytrty » Mon Feb 14, 2022 7:06 am

ESP_Sprite wrote:
Mon Feb 14, 2022 1:17 am
What ESP-IDF version is this with?
Its version 4.4 windows
esptool is version 3.2

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

Re: ESP32-C3 USB/JTAG not working after software reboot

Postby ESP_Sprite » Wed Feb 16, 2022 9:19 am

Strange, I can't replicate this on a random minimalistic devboard with esp-idf 4.4... flashing hello world results in a succesful boot. After the reboot, for some reason the ROM chatter doesn't show up, but the countdown/reboot message does repeat.

Do you have any other ESP32C3 boards you could check this with?

arnytrty
Posts: 7
Joined: Sun Feb 13, 2022 5:31 pm

Re: ESP32-C3 USB/JTAG not working after software reboot

Postby arnytrty » Wed Feb 16, 2022 4:19 pm

Yes, I have (ESP32-C3-12F from Ai Thinker). And it gives me the same results. This is log from the UART:

Code: Select all

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
Saved PC:0x403804c6
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x16b4
load:0x403ce000,len:0x930
load:0x403d0000,len:0x2d40
entry 0x403ce000
I (35) boot: ESP-IDF v4.4 2nd stage bootloader
I (35) boot: compile time 17:39:34
I (35) boot: chip revision: 3
I (37) boot.esp32c3: SPI Speed      : 80MHz
I (41) boot.esp32c3: SPI Mode       : DIO
I (46) boot.esp32c3: SPI Flash Size : 4MB
I (51) boot: Enabling RNG early entropy source...
I (56) boot: Partition Table:
I (60) boot: ## Label            Usage          Type ST Offset   Length
I (67) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (75) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (82) boot:  2 factory          factory app      00 00 00010000 00100000
I (89) boot: End of partition table
I (94) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=06d30h ( 27952)                                                                                                                                                                                                map
I (106) esp_image: segment 1: paddr=00016d58 vaddr=3fc8a000 size=013dch (  5084)                                                                                                                                                                                                load
I (111) esp_image: segment 2: paddr=0001813c vaddr=40380000 size=07edch ( 32476)                                                                                                                                                                                                load
I (125) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=127c8h ( 75720)                                                                                                                                                                                                map
I (139) esp_image: segment 4: paddr=000327f0 vaddr=40387edc size=02004h (  8196)                                                                                                                                                                                                load
I (141) esp_image: segment 5: paddr=000347fc vaddr=50000010 size=00010h (    16)                                                                                                                                                                                                load
I (148) boot: Loaded app from partition at offset 0x10000
I (151) boot: Disabling RNG early entropy source...
I (168) cpu_start: Pro cpu up.
I (176) cpu_start: Pro cpu start user code
I (176) cpu_start: cpu freq: 160000000
I (176) cpu_start: Application information:
I (179) cpu_start: Project name:     hello_world
I (184) cpu_start: App version:      1
I (189) cpu_start: Compile time:     Feb 13 2022 17:39:06
I (195) cpu_start: ELF file SHA256:  fdc348738538a48c...
I (201) cpu_start: ESP-IDF:          v4.4
I (206) heap_init: Initializing. RAM available for dynamic allocation:
I (213) heap_init: At 3FC8C240 len 00033DC0 (207 KiB): DRAM
I (219) heap_init: At 3FCC0000 len 0001F060 (124 KiB): STACK/DRAM
I (226) heap_init: At 50000020 len 00001FE0 (7 KiB): RTCRAM
I (233) spi_flash: detected chip: generic
I (237) spi_flash: flash io: dio
I (241) sleep: Configure to isolate all GPIO pins in sleep state
I (248) sleep: Enable automatic switching of GPIO sleep configuration
I (255) cpu_start: Starting scheduler.
Hello world!
This is esp32c3 chip with 1 CPU core(s), WiFi/BLE, silicon revision 3, 4MB exter                                                                                                                                                                                               nal flash
Minimum free heap size: 329692 bytes
Restarting in 10 seconds...
Restarting in 9 seconds...
Restarting in 8 seconds...
Restarting in 7 seconds...
Restarting in 6 seconds...
Restarting in 5 seconds...
Restarting in 4 seconds...
Restarting in 3 seconds...
Restarting in 2 seconds...
Restarting in 1 seconds...
Restarting in 0 seconds...
Restarting now.
Restarting is working, but the USB/JTAG stop sendinig stuff after the software reset, unplugging and plugging back does not help, only thing that helps is to poweroff/poweron.

Can this be problem with drivers, or ESP-IDF? I tried this test on linux and it does not work too and I remembered when I was trying this sketch with older ESP-IDF (i think something about 4.3.1), it worked.

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

Re: ESP32-C3 USB/JTAG not working after software reboot

Postby ESP_Sprite » Thu Feb 17, 2022 3:09 am

Can you do a 'git describe' in your esp-idf directory, so I can make sure I have the exact same version here?

Who is online

Users browsing this forum: No registered users and 123 guests