I have a problem with wake up my device from deep sleep each basing on ESP32C3. Pin to do that is GPIO_NUM_2 and state to wake up is HIGH. This pin is useing to monitoring charger connected. I also have some observations.
- Device awake, charger unplugged – voltage around 0V (good)
- Device awake, charger connected – voltage around 3V (good)
- Device asleep, charger unplugged – voltage 0V
- Device asleep, charger connected – voltage around 1V (this causes the device not to wake up after connecting the charger, because the voltage should supposedly be close to 3V)
Here is a how it was connected
And with MCU
And her is my simply code in each i try set wake up configuration.
ESP_ERROR_CHECK(gpio_set_direction(GPIO_NUM_2, GPIO_MODE_INPUT));
ESP_ERROR_CHECK(esp_deep_sleep_enable_gpio_wakeup(BIT(GPIO_NUM_2), ESP_GPIO_WAKEUP_GPIO_HIGH));
esp_sleep_config_gpio_isolate();
gpio_deep_sleep_hold_dis()