Code generation - wrong alternate function with partial USB and SDMMC initialization
Relevant to this post, created new one per
When some USB and SDMMC pins are in the GUI set to alternate function without their respective peripherals active, then there is code generated in MX_GPIO_Init() function that renders FDCAN1 nonfunctional.
Here is what's needed:
MCU STM32H723ZGT
In the GUI - Pins PD0 and PD1 mapped to FDCAN1 (RX, TX) with the peripheral enabled.
Pins PB14, PB15, PD6, PD7, PG11, PG12 mapped to SDMMC (D0, D1, CK, CMD, D2, D3) without the peripheral enabled.
PA11, PA12 to USB DM and DP without the peripheral enabled.
This code is generated in MX_GPIO_Init() which sets PA11 and PA12 to incorrect alternate function.
... /*Configure GPIO pins : PB14 PB15 */ GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_15; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Alternate = GPIO_AF9_SDMMC2; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); /*Configure GPIO pins : PA11 PA12 */ GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
Now FDCAN1 on pins PD0 and PD1 is not working.
IDE version: 1.15.0

STM32CubeMX version: 6.11.0
