Skip to content

Commit a9d04ed

Browse files
yn386dpgeorge
authored andcommitted
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 <[email protected]>
1 parent dbcfec7 commit a9d04ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ports/stm32/usbd_conf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd) {
182182

183183
// Configure USB GPIO's.
184184

185-
#if defined(STM32H723xx)
185+
#if defined(STM32H723xx) || (STM32H7A3xx) || defined(STM32H7A3xxQ)
186186

187187
// These MCUs don't have an alternate function for USB but rather require
188188
// the pins to be disconnected from all peripherals, ie put in analog mode.
@@ -204,7 +204,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd) {
204204

205205
// Other MCUs have an alternate function for GPIO's to be in USB mode.
206206

207-
#if defined(STM32H7A3xx) || defined(STM32H7A3xxQ) || defined(STM32H7B3xx) || defined(STM32H7B3xxQ)
207+
#if defined(STM32H7B3xx) || defined(STM32H7B3xxQ)
208208
const uint32_t otg_alt = GPIO_AF10_OTG1_FS;
209209
#elif defined(STM32H7)
210210
const uint32_t otg_alt = GPIO_AF12_OTG2_FS;

0 commit comments

Comments
 (0)