How do I get the "Generate Code" to create HAL GPIO pins?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-26 4:31 PM
I've just finished the tutorials on MP1 and have built a few Nucleo projects. When I want to use a GPIO pin on the Nucleo board I go o the ioc file, name a pin and hit Project > Generate Code, and I'll see the pins at the bottom of my Core > main.c file, but when I do that in a new project for the MP1, I don't see anything added to the project.
Further, if I search the entire directory for the name of the pin "HEATER" in my case, I don't see it anywhere else but the ioc file.
```
$ grep -rnw . -e 'HEATER'
./test.ioc:647:PA10.GPIO_Label=HEATER
```
What am I doing wrong?
Solved! Go to Solution.
- Labels:
-
STM32MP15 Lines
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-26 11:06 PM
Hi,
after selecting GPIO input or output, you also have to right click on the pin and assign 'pin reservation' to 'Cortex-M4'.
M4 code will then be generated correctly.
Regards,
In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-26 11:06 PM
Hi,
after selecting GPIO input or output, you also have to right click on the pin and assign 'pin reservation' to 'Cortex-M4'.
M4 code will then be generated correctly.
Regards,
In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-27 3:57 PM
Thanks! That did come up as a GPIO pin, but I'm still not able to control it. I was under the impression that the HAL made it the case that if I used the same "Pin Name" it would map to the same Arduino pin. For instance, I'm using PA10 which is mapped to D2 on the Neucleo, but that pin doesn't seem to go high on the STM32, am I missing something here? Is there a different pin mapping for SMT32MP1 with HAL?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-27 4:54 PM
Never mind, found it https://wiki.st.com/stm32mpu/wiki/STM32MP157x-DKx_-_hardware_description
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-27 11:11 PM
Yes, indeed, on the STM32MP157x-DKx, the D2 on Nucleo connector is mapped on PE1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-02 11:14 AM
How do I do this for pins I've assigned to an ADC? There is no option to assign it to the M4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-02 3:46 PM
Never mind, I see that it's in not in the right click menu, but in the configurations.
