Skip to content

Commit 54f2967

Browse files
committed
fix(esp_hw_support): fix usj pad config bad retention
Closes #15797
1 parent dc678de commit 54f2967

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

components/esp_hw_support/sleep_console.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -26,9 +26,11 @@ void sleep_console_usj_pad_backup_and_disable(void)
2626
// Enable USJ clock and clear reset
2727
usb_serial_jtag_ll_enable_bus_clock(true);
2828
usb_serial_jtag_ll_reset_register();
29+
usb_serial_jtag_ll_phy_enable_pad(false);
30+
s_usj_state.usj_pad_enabled = false;
31+
} else {
32+
s_usj_state.usj_pad_enabled = usb_serial_jtag_ll_phy_is_pad_enabled();
2933
}
30-
s_usj_state.usj_pad_enabled = usb_serial_jtag_ll_phy_is_pad_enabled();
31-
usb_serial_jtag_ll_phy_enable_pad(false);
3234
// Disable USJ clock
3335
usb_serial_jtag_ll_enable_bus_clock(false);
3436
}

0 commit comments

Comments
 (0)