Hi
I'm using the standard ESP32/DeepSleep/TimerWakeUp sketch to play around with the Firebeetle ESP32 board. I've turned off the onbaord LED when awake (driven pin LOW), but when I enter deepsleep, the onboard LED is pulled high. Can someone please advise on the best method of ensuring all pins are pulled low (Or completely disabled) to ensure minimal power consumption and/or leakage when the board is in deep sleep.
I have tried using;
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_OFF);
But clearly this command doesn't control the state of pins and has no effect.
I read in the Espressif docs, that GPIOs can be explicitly isolated as per this snippet from the docs available here.
=== Quote from docs ===
For example, on ESP32-WROVER module, GPIO12 is pulled up externally, and it also has an internal pulldown in the ESP32 chip. This means that in Deep-sleep, some current will flow through these external and internal resistors, increasing Deep-sleep current above the minimal possible value.
Add the following code before esp_deep_sleep_start() to remove such extra current:
rtc_gpio_isolate(GPIO_NUM_12);
=== End Quote from docs ===
I have tried to use this command for GPIO2 which on the FireBeetle is D9/Onboard LED but I'm getting a scope error.. Can anyone advise what header I need to include for these additional ESP32 commands?
rtc_gpio_isolate(GPIO_NUM_2);
yields the error
TimerWakeUp:80:3: error: 'rtc_gpio_isolate' was not declared in this scope
rtc_gpio_isolate(GPIO_NUM_2);
^~~~~~~~~~~~~~~~
C:\Users\Mat\AppData\Local\Temp\arduino_modified_sketch_369418\TimerWakeUp.ino:80:3: note: suggested alternative: 'gpio_isr_t'
rtc_gpio_isolate(GPIO_NUM_2);
^~~~~~~~~~~~~~~~
gpio_isr_t
exit status 1
'rtc_gpio_isolate' was not declared in this scope
If anyone can clarify for me I'd really apreciate the help.
Thanks,