On a ESP32-D0WD module I am trying to set RTC_GPIO8 (GPIO33) in the esp_wake_deep_sleep() function using the esp-idf framework. This obviously means some REG_WRITE() and REG_READ() register "joggling".
So far I have come up with this (which apparently is not enough):
// Enable GPIO output
REG_WRITE(RTC_GPIO_ENABLE_W1TS_REG, REG_READ(RTC_GPIO_ENABLE_REG) | BIT(RTC_GPIO_ENABLE_W1TS_S + 8));
// Set the GPIO output bit high
REG_WRITE(RTC_GPIO_OUT_W1TS_REG, REG_READ(RTC_GPIO_OUT_REG) | BIT(RTC_GPIO_OUT_DATA_W1TS_S + 8));
Can anyone give me at hint on what ESP32 registers to use right after deep sleep wakeup, in order to set GPIO33 (RTC_GPIO8) to high?
Thanks!