Page 1 of 1

ESP32-C3 WROOM-02 crash

Posted: Sat Oct 23, 2021 12:32 pm
by bernardbru
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

Re: ESP32-C3 WROOM-02 crash

Posted: Sun Oct 24, 2021 6:12 am
by ESP_Sprite
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.

Re: ESP32-C3 WROOM-02 crash

Posted: Sun Oct 24, 2021 7:00 am
by bernardbru
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.

Re: ESP32-C3 WROOM-02 crash

Posted: Sun Oct 24, 2021 12:46 pm
by ESP_Sprite
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?