2023-06-13 12:06 AM
Hello,
I am working with cubeMX and trying to configure a pin to output mode.
The MX_GPIO_init() is not generated correctly, there is just clock enabling of the bus connected to the GPIO ports without the configuration of the pins.
I am using
CubeMX: 6.8
CubeIDE: 1.12.0
Thank you,
Ahmed
2023-06-13 12:26 AM
Welcome, @Ahmed Louati, to the community!
Then post the IOC file you used here, so that we can take a look at it.
Regards
/Peter
2023-06-13 01:58 AM
2023-06-13 05:01 AM
Initially you did not tell us which STM32 (apparently) does not work.
From the IOC I could then see that you are using the dual core STM32H745ZI, where you have to specify for the GPIO in which context, i.e. which core they are to be controlled.
In your specific case:
Generate code and be happy.
Hope that helps?
Good luck!
/Peter
2023-06-13 05:08 AM
Forgot to mention:
You can also change several pins together by:
2023-06-13 05:44 AM
Ah! I didn't know about the Pin Reservation config! I am not that familiar with dual-core STM32 MCUs.
Thank you, Mr. Peter, for your fast and detailed reply!
So grateful!
2023-06-13 05:56 AM
You're welcome!
If the problem is solved, please mark this thread as answered by selecting Select as best, as also explained here. This will help other users find that answer faster.
Regards
/Peter