Code: Select all
rst:0x8 (TG1WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:12776
load:0x40080400,len:3032
entry 0x400805e4
Code: Select all
esp_err_t sleepRet = ESP_OK;
uint32_t pulseDelay = pulseLengthmillis * 1000; // how many microseconds will the pulse last, since the sleeptimer uses uS
pulseDelay = pulseDelay / (brightLevel*2); // how long to delay between each brightness iteration
esp_sleep_enable_timer_wakeup(pulseDelay);
for (uint8_t i = 0; i < brightLevel; i++) {
digitalWrite(PIN_LED_SHDN, LOW);
Set_LED_Color(ledDisplay, 1, 0x00, 0x00, i);
Set_LED_Color(ledDisplay, 2, 0x00, 0x00, i);
Set_LED_Color(ledDisplay, 3, 0x00, 0x00, i);
Set_LED_Color(ledDisplay, 4, 0x00, 0x00, i);
Set_LED_Color(ledDisplay, 5, 0x00, 0x00, i);
Update_Display(ledDisplay);
digitalWrite(PIN_LED_SHDN, HIGH);
sleepRet = esp_light_sleep_start();
}
I isolated the pulse code, and running it independently of everything else, it functions just fine, as it did in testing.
When I connect to wifi first, though, it resets due to RTCWDT_RTC_RESET after 18 pulses (one pulse = 62 x 4032uS lightsleep entries / exits).
Code: Select all
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:12776
load:0x40080400,len:3032
entry 0x400805e4
Based on other posts here that might be related to this issue, I verified that the power supply was sufficient by powering the system directly with 3.3V from my bench supply with no current limit.
This is pretty vanilla code, I'm not using FreeRTOS or touching any watchdog timers at all (that I'm aware of).