stm32: Update STM32L452xx Multi OTG handling.
Added custom Multi OTG handling for STM32L452xx, based on STM32L432xx handling. Fixes issue #15795. Signed-off-by: Adrian Higgins <adrian@higstar.com>
This commit is contained in:
parent
f1bdac3752
commit
39ddfed9a0
@ -619,7 +619,7 @@
|
||||
// Whether the USB peripheral is device-only, or multiple OTG
|
||||
// For STM32G0 and STM32H5 the USB peripheral supports device and host mode,
|
||||
// but otherwise acts like a non-multi-OTG peripheral.
|
||||
#if defined(STM32G0) || defined(STM32G4) || defined(STM32H5) || defined(STM32L0) || defined(STM32L1) || defined(STM32L432xx) || defined(STM32WB)
|
||||
#if defined(STM32G0) || defined(STM32G4) || defined(STM32H5) || defined(STM32L0) || defined(STM32L1) || defined(STM32L432xx) || defined(STM32L452xx) || defined(STM32WB)
|
||||
#define MICROPY_HW_USB_IS_MULTI_OTG (0)
|
||||
#else
|
||||
#define MICROPY_HW_USB_IS_MULTI_OTG (1)
|
||||
|
||||
@ -312,7 +312,7 @@ void USB_DRD_FS_IRQHandler(void) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#elif defined(STM32L0) || defined(STM32L432xx)
|
||||
#elif defined(STM32L0) || defined(STM32L432xx) || defined(STM32L452xx)
|
||||
|
||||
#if MICROPY_HW_USB_FS
|
||||
void USB_IRQHandler(void) {
|
||||
|
||||
@ -93,7 +93,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd) {
|
||||
const uint32_t otg_alt = GPIO_AF10_OTG1_FS;
|
||||
#elif defined(STM32L0)
|
||||
const uint32_t otg_alt = GPIO_AF0_USB;
|
||||
#elif defined(STM32L432xx)
|
||||
#elif defined(STM32L432xx) || defined(STM32L452xx)
|
||||
const uint32_t otg_alt = GPIO_AF10_USB_FS;
|
||||
#elif defined(STM32H5) || defined(STM32WB)
|
||||
const uint32_t otg_alt = GPIO_AF10_USB;
|
||||
@ -156,7 +156,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd) {
|
||||
#elif defined(STM32L0)
|
||||
NVIC_SetPriority(USB_IRQn, IRQ_PRI_OTG_FS);
|
||||
HAL_NVIC_EnableIRQ(USB_IRQn);
|
||||
#elif defined(STM32L432xx)
|
||||
#elif defined(STM32L432xx) || defined(STM32L452xx)
|
||||
NVIC_SetPriority(USB_FS_IRQn, IRQ_PRI_OTG_FS);
|
||||
HAL_NVIC_EnableIRQ(USB_FS_IRQn);
|
||||
#elif defined(STM32G4) || defined(STM32L1) || defined(STM32WB)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user