ESP32-C3 WROOM-02 crash

bernardbru
Posts: 6
Joined: Fri Aug 13, 2021 8:42 am

ESP32-C3 WROOM-02 crash

Postby bernardbru » Sat Oct 23, 2021 12:32 pm

Hello,
I run this very simple code:

ESP_ERROR_CHECK(esp_timer_init());
printf("\nStarted timers, time since boot: %lld us", esp_timer_get_time());
vTaskDelay(pdMS_TO_TICKS( 10 ));
while(1);


Nothing is printed on screen and I can't access anymore the device by USB.
For USB, I use USB to JTAG connected on IO18 and IO19 / D+ D-
The use of reset button does nothing.

I encounter this kind of problem with other pieces of code.
At the end, I'm obliged to use an other esp32C3.
What's wrong ?

Regards

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

Re: ESP32-C3 WROOM-02 crash

Postby ESP_Sprite » Sun Oct 24, 2021 6:12 am

That code does a whole heap of things that are generally Not Good... re-initializing timers, a while(1) loop... I'm wondering if you are getting a RTC WDT reset as soon as your program starts up, which also resets USB; as that happens repeatedly, your PC has no chance to properly enumerate the device.

Anyway, the solution would be to force download mode by grounding GPIO9 before powering on or resetting the ESP32C3. This allows the ESP32C3 to be flashed regardless of what's already in the flash.

bernardbru
Posts: 6
Joined: Fri Aug 13, 2021 8:42 am

Re: ESP32-C3 WROOM-02 crash

Postby bernardbru » Sun Oct 24, 2021 7:00 am

Thank you for your answer.
This was a toy exemple.
Indded, I force GPIO9 to ground and reset device before flashing but this doesn't not help.
It's no more possible to access the device.

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

Re: ESP32-C3 WROOM-02 crash

Postby ESP_Sprite » Sun Oct 24, 2021 12:46 pm

Then it's either a hardware error, or something in your PCs OS. What OS and hardware do you use? If you unplug USB, connect GPIO9 to GND, power up the ESP32C3 and plug in the device, what exactly do you see your OS do? Does the device show up under USB devices (use lsusb under Linux, look under whatever the device manager is under another OS), do you see the serial port appear, does 'idf.py flash' give you any specific error?

Who is online

Users browsing this forum: No registered users and 39 guests