Page 1 of 1

ESP32 Getting Reset again and again

Posted: Tue Mar 28, 2023 7:16 pm
by suresh2010
Hi All,

I am using the esp32 dev kit version 1. I ported Arduino mega2650 code for esp32 with some modifications in the library. Although it gets complied for esp32 successfully on uploading the code, esp32 gets reset again and again. I'm not able to find the exact reason. Below is the log snippet of the serial monitor with some information. I'm attaching the my code.
  1. rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
  2. configsip: 0, SPIWP:0xee
  3. clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
  4. mode:DIO, clock div:1
  5. load:0x3fff0030,len:1184
  6. load:0x40078000,len:13220
  7. ho 0 tail 12 room 4
  8. load:0x40080400,len:3028
  9. entry 0x400805e4
  10. ets Jul 29 2019 12:21:46

Re: ESP32 Getting Reset again and again

Posted: Fri Mar 31, 2023 12:44 am
by corneo
Just spitballing here because most of the log stuff you posted, although decipherable by some, I'm sure, is all but useless gibberish to me, (;->) but...

I did see an indication that it was (possibly?) caused by a Real-Time Clock Watch-Dog-Timer (??RTCWDT??) that expired. Note "RTCWDT" in the first line of your log post:
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)

I just happened to look at some ESP library code that set up the WDT I suspect is the culprit. It seems that the WDT is restarted before loop() is called. If your loop() routing is running 'a long time' the timer will pop. I think the attached interrupt service routine (ISR) had code to reboot the board.

So if your loop routine is 'running too long' this will happen. If you know that it is running too long, and you have a good reason for it, I think it can be disabled with a library call, the details of which are long wiped from my memory. I suspect if you search the library docs for WDT or watchdog timer you might find what you need.

Good luck, and if the cause has nothing to do with WDT I apologize for sending you on a goose chase.

Re: ESP32 Getting Reset again and again

Posted: Sun Apr 16, 2023 4:12 pm
by stevew
  1.   esp_sleep_enable_timer_wakeup(5000000);
  2.            
  3.              Serial.flush();
  4.              delay(100);
  5.              delay(1);
  6.              yield();
  7.              vTaskDelay(pdMS_TO_TICKS(30));
  8.              rtc_wdt_disable();
  9.             esp_light_sleep_start();
  10.             rtc_wdt_enable();
I have similar problem but different chip (ESP32 WROOM ).
  1. rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
  2. configsip: 0, SPIWP:0xee
  3. clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
  4. mode:DIO, clock div:1
  5. load:0x3fff0018,len:4
  6. load:0x3fff001c,len:1044
  7. load:0x40078000,len:10124
  8. load:0x40080400,len:5856
  9. entry 0x400806a8