cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt with GPIO config in stm32cubemx

rubenles
Associate III

Hello,

I have a question while configuring the GPIO on stm32cubeMX. I put all my pins in the program like this:

rubenles_0-1706881193579.png

When I configure all the pins and generate the code, not all the configured pins appear in the gpio.c file on stm32cubeIDE; for example, the UART RX and TX pins do not appear in stm32cubeIDE.

Thank you so much.

1 ACCEPTED SOLUTION

Accepted Solutions
Andrew Neil
Evangelist

@rubenles wrote:

the UART RX and TX pins do not appear in stm32cubeIDE.


Because they are used as UART RX & TX - rather than just as GPIOs ?

Have you looked in the UART config?

EDIT:

See the HAL_UART_MspInit() in your usart.c; also look in main.h ...

View solution in original post

6 REPLIES 6
SofLit
ST Employee

Hello,

Could you please share your ioc file reproducing the behavior as we could understand what is going on?

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.
Andrew Neil
Evangelist

@rubenles wrote:

the UART RX and TX pins do not appear in stm32cubeIDE.


Because they are used as UART RX & TX - rather than just as GPIOs ?

Have you looked in the UART config?

EDIT:

See the HAL_UART_MspInit() in your usart.c; also look in main.h ...

TDK
Guru

Normally, pins are initialized in stm32h7xx_hal_msp.c for most peripherals.

If you feel a post has answered your question, please click "Accept as Solution".

@Andrew Neil UART config was there, true, thank you so much for this advice!!! Other gpio still doesn't appear, but uart is solved thank you!!

@TDK This file is empty for me, just one interrupt configuration is in there

 

  __HAL_RCC_SYSCFG_CLK_ENABLE();

  /* System interrupt init*/
  /* PendSV_IRQn interrupt configuration */
  HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0);

But nothing about gpio configs.

Thank you 

Just trying to generate the code to show it to you, i realize that now all the gpio configs are there. I don't really know if i was confused just with UART or it was an error. By the way, it is solved, thank you so much.