Hello. The idea is that I am setting a flag in ISR and want to restart immediately to run normal loop + flagged code.
1) What is the fastest/efficient/most graceful way to restart immediately inside of the ISR? Some of the ways I can think of would be:
Code: Select all
esp_sleep_enable_timer_wakeup(1);
esp_deep_sleep_start();
Code: Select all
esp_sleep_enable_timer_wakeup(1);
esp_light_sleep_start();
2) My code involves usage of wifi in the normal loop. When the interrupt is triggered, I tried to deinit wifi in the ISR, but ISR watchdog got triggered. I removed that code and have not faced any issue since. However, I was wondering, is there any impact on memory in the long run of restarting from ISR without deinitializing wifi?