summaryrefslogtreecommitdiff
path: root/src/portable
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-05-21 11:19:07 +0700
committerhathach <[email protected]>2025-05-21 11:19:07 +0700
commitc1d23a0a92bef016e22be3ed8194230cfab1c358 (patch)
tree3c3db1607a1762ab47062208d3ec5295489cc307 /src/portable
parenta4875fefead1a2b27f13a588dea44eaca737f553 (diff)
osal_spin skipping lock/unlock when executed in isr
Diffstat (limited to 'src/portable')
-rw-r--r--src/portable/synopsys/dwc2/dcd_dwc2.c9
-rw-r--r--src/portable/synopsys/dwc2/dwc2_esp32.h4
2 files changed, 4 insertions, 9 deletions
diff --git a/src/portable/synopsys/dwc2/dcd_dwc2.c b/src/portable/synopsys/dwc2/dcd_dwc2.c
index 67484c3df..19eac6e15 100644
--- a/src/portable/synopsys/dwc2/dcd_dwc2.c
+++ b/src/portable/synopsys/dwc2/dcd_dwc2.c
@@ -1020,16 +1020,11 @@ void dcd_int_handler(uint8_t rhport) {
if (gintsts & GINTSTS_USBRST) {
// USBRST is start of reset.
- #if TUP_MCU_MULTIPLE_CORE
- osal_spin_lock(&_dcd_spinlock, true);
- #endif
-
dwc2->gintsts = GINTSTS_USBRST;
- handle_bus_reset(rhport);
- #if TUP_MCU_MULTIPLE_CORE
+ osal_spin_lock(&_dcd_spinlock, true);
+ handle_bus_reset(rhport);
osal_spin_unlock(&_dcd_spinlock, true);
- #endif
}
if (gintsts & GINTSTS_ENUMDNE) {
diff --git a/src/portable/synopsys/dwc2/dwc2_esp32.h b/src/portable/synopsys/dwc2/dwc2_esp32.h
index 3309760ff..49b8c54cb 100644
--- a/src/portable/synopsys/dwc2/dwc2_esp32.h
+++ b/src/portable/synopsys/dwc2/dwc2_esp32.h
@@ -55,8 +55,8 @@ static const dwc2_controller_t _dwc2_controller[] = {
// On ESP32 for consistency we associate
// - Port0 to OTG_FS, and Port1 to OTG_HS
static const dwc2_controller_t _dwc2_controller[] = {
-{ .reg_base = DWC2_FS_REG_BASE, .irqnum = ETS_USB_OTG11_CH0_INTR_SOURCE, .ep_count = 7, .ep_in_count = 5, .ep_fifo_size = 1024 },
-{ .reg_base = DWC2_HS_REG_BASE, .irqnum = ETS_USB_OTG_INTR_SOURCE, .ep_count = 16, .ep_in_count = 8, .ep_fifo_size = 4096 }
+ { .reg_base = DWC2_FS_REG_BASE, .irqnum = ETS_USB_OTG11_CH0_INTR_SOURCE, .ep_count = 7, .ep_in_count = 5, .ep_fifo_size = 1024 },
+ { .reg_base = DWC2_HS_REG_BASE, .irqnum = ETS_USB_OTG_INTR_SOURCE, .ep_count = 16, .ep_in_count = 8, .ep_fifo_size = 4096 }
};
#endif