mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
usb_serial_jtag: Improve the code for the issue of usb cdc device unable to work during sleep
1. Remove RTC_CLOCK_BBPLL_POWER_ON_WITH_USB Kconfig option During sleep, BBPLL clock always gets disabled esp_restart does not disable BBPLL clock, so that first stage bootloader log can be printed 2. Add a new Kconfig option PM_NO_AUTO_LS_ON_USJ_CONNECTED When this option is selected, IDF will constantly monitor USB CDC port connection status. As long as it gets connected to a HOST, automatic light-sleep will not happen. Closes https://github.com/espressif/esp-idf/issues/8507
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -65,6 +65,16 @@ static inline uint32_t usb_serial_jtag_ll_get_intsts_mask(void)
|
||||
return USB_SERIAL_JTAG.int_st.val;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the USB_SERIAL_JTAG raw interrupt status.
|
||||
*
|
||||
* @return The USB_SERIAL_JTAG raw interrupt status.
|
||||
*/
|
||||
static inline __attribute__((always_inline)) uint32_t usb_serial_jtag_ll_get_intraw_mask(void)
|
||||
{
|
||||
return USB_SERIAL_JTAG.int_raw.val;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Clear the USB_SERIAL_JTAG interrupt status based on the given mask.
|
||||
*
|
||||
@@ -72,7 +82,7 @@ static inline uint32_t usb_serial_jtag_ll_get_intsts_mask(void)
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
static inline void usb_serial_jtag_ll_clr_intsts_mask(uint32_t mask)
|
||||
static inline __attribute__((always_inline)) void usb_serial_jtag_ll_clr_intsts_mask(uint32_t mask)
|
||||
{
|
||||
USB_SERIAL_JTAG.int_clr.val = mask;
|
||||
}
|
||||
|
Reference in New Issue
Block a user