Hi STM32 Support Team,
I have an existing STM32CubeMX project for the Nucleo-F303RE board which uses UART2.
In the project the pins PA2 (Tx) and PA3 (RX) are configured as alternate function pins. In the old code (probably generated with V4.15.x) I could see that the pins were correctly initialized, file main.c, function MX_GPIO_Init:
/*Configure GPIO pins : USART_TX_Pin USART_RX_Pin */
GPIO_InitStruct.Pin = USART_TX_Pin|USART_RX_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
Now, I am using a newer version of STM32CubeMX (V.4.20.0 and also newer libraries) and the above mentioned code is missing! Also, the TX pins is showing a low level in idle state. (I would have expected a high level.)
Can you confirm this issue? Is this an intentioned feature?
PS at development team: I would be very helpful if you would enclose in all auto-generated fils which STM3CubeMx was used and which libraries were involved.