diff --git a/components/esp_hw_support/sleep_console.c b/components/esp_hw_support/sleep_console.c index 2df1ad4896..c2954d59a1 100644 --- a/components/esp_hw_support/sleep_console.c +++ b/components/esp_hw_support/sleep_console.c @@ -9,7 +9,7 @@ #include "esp_private/sleep_console.h" #include "esp_attr.h" -#if SOC_USB_SERIAL_JTAG_SUPPORTED +#if SOC_USB_SERIAL_JTAG_SUPPORTED && !SOC_USB_SERIAL_JTAG_SUPPORT_LIGHT_SLEEP #include "hal/usb_serial_jtag_ll.h" static sleep_console_usj_enable_state_t s_usj_state = {0}; @@ -26,12 +26,12 @@ void sleep_console_usj_pad_backup_and_disable(void) // Enable USJ clock and clear reset usb_serial_jtag_ll_enable_bus_clock(true); usb_serial_jtag_ll_reset_register(); - usb_serial_jtag_ll_phy_enable_pad(false); s_usj_state.usj_pad_enabled = false; } else { s_usj_state.usj_pad_enabled = usb_serial_jtag_ll_phy_is_pad_enabled(); } - // Disable USJ clock + // Disable USJ pad & clock + usb_serial_jtag_ll_phy_enable_pad(false); usb_serial_jtag_ll_enable_bus_clock(false); }