2025-01-07 04:11 PM - edited 2025-01-07 04:11 PM
Hi,
I have a project that was started on STM32F439 which I'm now migrating to STM32H755.
In my original project I had a number of GPIO assignments for which the code generator was creating definitions in main.h, such as below:
#define LCD_RST_Pin GPIO_PIN_2
#define LCD_RST_GPIO_Port GPIOF
In the above example I've assigned user label LCD_RST to the pin.
Following the same approach on the H7, for the C7 .ioc file I've similarly made my GPIO assignments, however I can't find any generated code relating to them. In this case main.h is much shorter, lacking any #defines relating to GPIOs. I've searched also for the GPIO pin name (such as PB2) but the only instances I can find are in the ioc file.
Any advice would be much appreciated, my ioc is attached.
Thanks in advance.
Solved! Go to Solution.
2025-01-07 06:04 PM - edited 2025-01-07 06:05 PM
You need to assign them to a core in the GPIO tab. Once you do that, they'll appear in the initialization code for that core.
2025-01-07 06:04 PM - edited 2025-01-07 06:05 PM
You need to assign them to a core in the GPIO tab. Once you do that, they'll appear in the initialization code for that core.
2025-01-08 12:48 AM - edited 2025-01-08 12:48 AM
Many thanks, that's very helpful.
Given that I was configuring the GPIOs in the C7's ioc file it seems strange that I also need to select the core assignment there. Is this to allow a GPIO to be potentially used from either core, with the user then responsible for writing the required GPIO initialisation code, and basically generating the code that MX creates when the assignment is not "free"?
2025-01-08 07:36 AM
The IOC file you attached controls both cores, doesn't it? It does when I load it. I don't think there is a separate one per core.