mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 01:40:14 +01:00
stm32/usbd_conf: Change USB pin configuration for STM32H7A3.
STM32H7A3 uses PA11, PA12 to enable USB function via built-in USB OTG port on NUCLEO board. Signed-off-by: Yuuki NAGAO <wf.yn386@gmail.com>
This commit is contained in:
committed by
Damien George
parent
dbcfec7df8
commit
a9d04ed0a2
@@ -182,7 +182,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd) {
|
||||
|
||||
// Configure USB GPIO's.
|
||||
|
||||
#if defined(STM32H723xx)
|
||||
#if defined(STM32H723xx) || (STM32H7A3xx) || defined(STM32H7A3xxQ)
|
||||
|
||||
// These MCUs don't have an alternate function for USB but rather require
|
||||
// the pins to be disconnected from all peripherals, ie put in analog mode.
|
||||
@@ -204,7 +204,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd) {
|
||||
|
||||
// Other MCUs have an alternate function for GPIO's to be in USB mode.
|
||||
|
||||
#if defined(STM32H7A3xx) || defined(STM32H7A3xxQ) || defined(STM32H7B3xx) || defined(STM32H7B3xxQ)
|
||||
#if defined(STM32H7B3xx) || defined(STM32H7B3xxQ)
|
||||
const uint32_t otg_alt = GPIO_AF10_OTG1_FS;
|
||||
#elif defined(STM32H7)
|
||||
const uint32_t otg_alt = GPIO_AF12_OTG2_FS;
|
||||
|
||||
Reference in New Issue
Block a user