summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2023-10-31 20:45:06 +0100
committerHiFiPhile <[email protected]>2023-10-31 20:45:06 +0100
commit86f00f6b499208d2e1254709ad6f80878f73a825 (patch)
tree604cb8706aab15a0519807b6c42a023d072ef855
parent4c01c5a714e535fdc89ba005b5453e454817d4c5 (diff)
Fix STM32F7 OTG_HS GPIO alt mapping.
-rw-r--r--hw/bsp/stm32f7/family.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/bsp/stm32f7/family.c b/hw/bsp/stm32f7/family.c
index 18cee073d..61f1d2a7f 100644
--- a/hw/bsp/stm32f7/family.c
+++ b/hw/bsp/stm32f7/family.c
@@ -182,7 +182,7 @@ void board_init(void) {
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
- GPIO_InitStruct.Alternate = GPIO_AF10_OTG_HS;
+ GPIO_InitStruct.Alternate = GPIO_AF12_OTG_HS_FS;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
// Enable HS VBUS sense (B device) via pin PB13
@@ -192,8 +192,8 @@ void board_init(void) {
GPIO_InitStruct.Pin = GPIO_PIN_13;
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
GPIO_InitStruct.Pull = GPIO_PULLUP;
- GPIO_InitStruct.Alternate = GPIO_AF10_OTG_HS;
- HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
+ GPIO_InitStruct.Alternate = GPIO_AF12_OTG_HS_FS;
+ HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/* Enable PHYC Clocks */
__HAL_RCC_OTGPHYC_CLK_ENABLE();