periodically wake up in light sleep mode
Posted: Fri Aug 06, 2021 9:29 am
Hello ESPers,
how do you wake up the ESP32 board in light sleep mode periodically and execute a certain function? In deep sleep mode I can check the wakeup reason at the beginning of the main function. However in light sleep mode the board just continues from where it stops right?
Is there any interrupt based methods that could detect the wakeup source is a timer and call a function?
To be more specific, I want to enable the ULP coprocessor while the main processor is in automatic light sleep mode. The ULP coprocessor poll sensor status from a IR camera and only wakes up the main processor when at least one pixel is hotter than a global threshold variable. This global variable should be updated by the main processor, reading from a temperature sensor every 2 hours. Now the problem is, how do I call a function when the main processor is waken from automatic light sleep mode?
Thx.
Best Regards
Zhao
how do you wake up the ESP32 board in light sleep mode periodically and execute a certain function? In deep sleep mode I can check the wakeup reason at the beginning of the main function. However in light sleep mode the board just continues from where it stops right?
Is there any interrupt based methods that could detect the wakeup source is a timer and call a function?
To be more specific, I want to enable the ULP coprocessor while the main processor is in automatic light sleep mode. The ULP coprocessor poll sensor status from a IR camera and only wakes up the main processor when at least one pixel is hotter than a global threshold variable. This global variable should be updated by the main processor, reading from a temperature sensor every 2 hours. Now the problem is, how do I call a function when the main processor is waken from automatic light sleep mode?
Thx.
Best Regards
Zhao