2025-11-26 5:33 AM - last edited on 2025-11-26 5:59 AM by TDK
When I create a new GPIO port configured as OUTPUT in STM32CubeMX, the pin definitely exists on my board. However, after I click Generate Code, the new pin configuration does not appear in main.c (for example, I don’t see the initialization code for that pin in MX_GPIO_Init()).
Why does this happen? I tried to investigate but couldn't find the reason.
My STM32CubeIDE version is 1.19.0.
The MCU I am using is STM32G071RBT3, and the specific pin I am trying to add is GPIOD pin 3 — but I also don’t see any other newly added pins in the generated code. None of the new GPIO ports appear after code generation.
THANKS
2025-11-26 6:00 AM
Please include the IOC you're having trouble with. Probably you are not generating code or using the code that is generated.
2025-11-26 6:28 AM