1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00

drivers/usbdev_synopsys_dwc2: add thread context switch at ISR exit

The USB device driver ISR sets a thread flag of the waiting USBUS thread to indicate that it has to handle a USB device driver event. However, setting a thread flag only sets `sched_context_switch_request` to indicate that a thread context switch would be required, but it is not executed. Therefore, for STM32 MCUs, `cortexm_isr_end` was called to execute the context switch. Since the driver is also used by other platforms, this call is replaced by a direct call of `thread_yield_higher` if required. NOTE: For ESP32x SoC, such a thread context switch is implicitly executed at the end of each ISR if necessary.
This commit is contained in:
Gunar Schorcht 2023-02-24 10:46:14 +01:00
parent 9528733a99
commit 9e8ef51283

View File

@ -1546,7 +1546,8 @@ void _isr_common(dwc2_usb_otg_fshs_t *usbdev)
}
_global_regs(conf)->GAHBCFG &= ~USB_OTG_GAHBCFG_GINT;
}
#ifdef MCU_STM32
#ifdef MODULE_CORTEXM_COMMON
cortexm_isr_end();
#endif
}