2026-02-16 7:33 AM
Inside Cube config, i do not get the other internal connected pins on pin 14, only PA8... in older versions it was available.
The chip is STM32U031F8...
What do i do wrong.. i need to use the uart_tx function on pin 14...
Thank you
Old version from Cubeide...
New version from Inet : 6.16.1
Solved! Go to Solution.
2026-02-18 5:54 AM
Hello @KJeps.3
I have raised this issue internally to the dedicated team for fix, (Ticket 227473 This is an internal tracking number and is not accessible or usable by customers.)
As a temporary workaround, I suggest that you copy the generated code of USART from the old project or to add this code manually to stm32u0xx_hal_msp.c :
void HAL_UART_MspInit(UART_HandleTypeDef* huart)
{
.
.
/* Peripheral clock enable */
__HAL_RCC_USART1_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
/* USER CODE BEGIN USART1_MspInit 1 */
GPIO_InitStruct.Pin = GPIO_PIN_9;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/* USER CODE END USART1_MspInit 1 */
Also ensure to keep your custom code inside /* USER CODE BEGIN ... */ / /* USER CODE END ... */ so that CubeMX won’t overwrite it.
BR, Souhaib
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-02-16 7:48 AM - edited 2026-02-16 7:50 AM
Hello @KJeps.3
Have you activated USART? Could you please describe the steps that led to this issue or attach an IOC file?
KR, Souhaib
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-02-16 8:03 AM
Hi,
I just created the project in freshly installed cubemx, and pushed the pin... the 2 other IO pin connections do not pop up...
I have now tried to enable USART, seems not to change anything...
For pin PA5 it seems to work ok to show more IO:
2026-02-17 5:53 AM
Hello @KJeps.3
To use the alternate functions of PA9 and PA10, you can use the remapping option under SYS as follows:
As it is possible to use PA9 instead of PA11 and PA10 instead of PA12. (you can use USART1_TX with pin15)
For Pin14 I will check internally with dedicated team to investigate the missing of the other function.
KR, Souhaib
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-02-17 8:48 AM
Hi,
I have to use pin 14 as the HW is already made...
/Kasper
2026-02-18 5:54 AM
Hello @KJeps.3
I have raised this issue internally to the dedicated team for fix, (Ticket 227473 This is an internal tracking number and is not accessible or usable by customers.)
As a temporary workaround, I suggest that you copy the generated code of USART from the old project or to add this code manually to stm32u0xx_hal_msp.c :
void HAL_UART_MspInit(UART_HandleTypeDef* huart)
{
.
.
/* Peripheral clock enable */
__HAL_RCC_USART1_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
/* USER CODE BEGIN USART1_MspInit 1 */
GPIO_InitStruct.Pin = GPIO_PIN_9;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/* USER CODE END USART1_MspInit 1 */
Also ensure to keep your custom code inside /* USER CODE BEGIN ... */ / /* USER CODE END ... */ so that CubeMX won’t overwrite it.
BR, Souhaib
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.