Skip to main content
KJeps.3
Associate II
February 16, 2026
Solved

Cubemx & Stm32U031

  • February 16, 2026
  • 1 reply
  • 261 views

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...

KJeps3_0-1771255803170.jpeg

 

New version from Inet : 6.16.1

KJeps3_1-1771255810598.jpeg

 

Best answer by Souhaib MAZHOUD

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

1 reply

Technical Moderator
February 16, 2026

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.
KJeps.3
KJeps.3Author
Associate II
February 16, 2026

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:

KJeps3_0-1771257817977.png

 

 

Technical Moderator
February 17, 2026

Hello @KJeps.3 

To use the alternate functions of PA9 and PA10, you can use the remapping option under SYS as follows:

SouhaibMAZHOUD_0-1771336365398.png


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.