Skip to content

Commit f69bbfe

Browse files
authored
fix usb_switch_to_cdc_jtag() not re-enable USB D+ before reset (espressif#7828)
1 parent 2ddce3c commit f69bbfe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cores/esp32/esp32-hal-tinyusb.c

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include "esp32s2/rom/usb/chip_usb_dw_wrapper.h"
4141
#elif CONFIG_IDF_TARGET_ESP32S3
4242
#include "hal/usb_serial_jtag_ll.h"
43+
#include "hal/usb_phy_ll.h"
4344
#include "esp32s3/rom/usb/usb_persist.h"
4445
#include "esp32s3/rom/usb/usb_dc.h"
4546
#include "esp32s3/rom/usb/chip_usb_dw_wrapper.h"
@@ -415,6 +416,7 @@ static void usb_switch_to_cdc_jtag(){
415416
digitalWrite(USBPHY_DP_NUM, LOW);
416417

417418
// Initialize CDC+JTAG ISR to listen for BUS_RESET
419+
usb_phy_ll_int_jtag_enable(&USB_SERIAL_JTAG);
418420
usb_serial_jtag_ll_disable_intr_mask(USB_SERIAL_JTAG_LL_INTR_MASK);
419421
usb_serial_jtag_ll_clr_intsts_mask(USB_SERIAL_JTAG_LL_INTR_MASK);
420422
usb_serial_jtag_ll_ena_intr_mask(USB_SERIAL_JTAG_INTR_BUS_RESET);

0 commit comments

Comments
 (0)