- Tue Aug 16, 2016 2:43 am
#53042
HI SeregaKai,
Not sure exactly what is wrong with your code, could be your call of wifi_fpm_open() after the set wakeup, but not sure, I use the following code succesfully,.
If that doesn't solve the problem take a look at your code, note the Delay i have placed after sleep, the ESP tends to continue during Ligh-Sleep and this causes a watch dog reset , resetting on its turn your ESP this could be happening in your code.
Code: Select allvoid fpm_wakup_cb_func1(void) {
wifi_fpm_close(); // disable force sleep function
//wifi_set_opmode(STATION_MODE); // set station mode
//wifi_station_connect();
// Serial.println("Woken up...");
}
void sleepNow(int MILI) {
// Serial.println("Going to sleep...");
wifi_fpm_set_sleep_type(LIGHT_SLEEP_T); // light sleep
wifi_fpm_open(); // enable force sleep
wifi_fpm_set_wakeup_cb(fpm_wakup_cb_func1); // Set wakeup callback
wifi_fpm_do_sleep(MILI * 1000);
delay(MILI + 10);
}
Kind Regards,
Orcanbull
Yes i can help you , Yes you can send me a PM with a question - No i won't make the code for you