mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-29 18:27:20 +02:00
fix(esp_hw_support): always disable USJ pad in sleep to supress leakage
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user