Doubt with GPIO config in stm32cubemx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-02 5: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.
- Labels:
-
STM32CubeMX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-02 6:00 AM - edited ‎2024-02-02 6: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 ...
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-02 5:51 AM
Hello,
Could you please share your ioc file reproducing the behavior as we could understand what is going on?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-02 6:00 AM - edited ‎2024-02-02 6: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 ...
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-02 6:37 AM
Normally, pins are initialized in stm32h7xx_hal_msp.c for most peripherals.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
