diff --git a/components/esp_hw_support/sleep_modes.c b/components/esp_hw_support/sleep_modes.c index d13f76abe0b..acc10a45878 100644 --- a/components/esp_hw_support/sleep_modes.c +++ b/components/esp_hw_support/sleep_modes.c @@ -1830,6 +1830,10 @@ esp_err_t esp_sleep_disable_wakeup_source(esp_sleep_source_t source) #if SOC_VBAT_SUPPORTED } else if (CHECK_SOURCE(source, ESP_SLEEP_WAKEUP_VBAT_UNDER_VOLT, RTC_VBAT_UNDER_VOLT_TRIG_EN)) { s_config.wakeup_triggers &= ~RTC_VBAT_UNDER_VOLT_TRIG_EN; +#endif +#if SOC_PM_SUPPORT_USB_WAKEUP + } else if (CHECK_SOURCE(source, ESP_SLEEP_WAKEUP_USB, RTC_USB_TRIG_EN)) { + s_config.wakeup_triggers &= ~RTC_USB_TRIG_EN; #endif } else { ESP_EARLY_LOGE(TAG, "Incorrect wakeup source (%d) to disable.", (int) source);