2024-02-02 05:43 AM
Hello,
I have a question while configuring the GPIO on stm32cubeMX. I put all my pins in the program like this:
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.
Solved! Go to Solution.
2024-02-02 06:00 AM - edited 2024-02-02 06:04 AM
@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 ...
2024-02-02 05:51 AM
Hello,
Could you please share your ioc file reproducing the behavior as we could understand what is going on?
2024-02-02 06:00 AM - edited 2024-02-02 06:04 AM
@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 ...
2024-02-02 06:37 AM
Normally, pins are initialized in stm32h7xx_hal_msp.c for most peripherals.
2024-02-04 10:32 PM
@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!!
2024-02-04 10:33 PM
@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
2024-02-04 10:42 PM
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.