2021-05-25 1:21 AM
Hello,
I'm trying to define some GPIOs as simple input/output for STM32MP157. I'm using the STM32CubeMX tool, but I can't find where to assign the GPIOs to A7 or M4. In the pinout view, I correctly set them as input/output but when I generate the code, I don't find their definition, nor in the device tree .dts, neither in the m4 code (only clock enable is present).
Thanks
Solved! Go to Solution.
2021-05-25 1:34 AM
Hi,
For M4, 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.
For A7, there is no automated generation of device tree in CubeMx, you should add it manually.
For A7/Linux, see:
https://wiki.st.com/stm32mpu/wiki/Overview_of_GPIO_pins
https://wiki.st.com/stm32mpu/wiki/GPIO_device_tree_configuration
https://wiki.st.com/stm32mpu/wiki/How_to_control_a_GPIO_in_userspace
Regards.
2021-05-25 1:34 AM
Hi,
For M4, 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.
For A7, there is no automated generation of device tree in CubeMx, you should add it manually.
For A7/Linux, see:
https://wiki.st.com/stm32mpu/wiki/Overview_of_GPIO_pins
https://wiki.st.com/stm32mpu/wiki/GPIO_device_tree_configuration
https://wiki.st.com/stm32mpu/wiki/How_to_control_a_GPIO_in_userspace
Regards.
2021-05-25 2:16 AM
@PatrickF Thank you very much!
2021-05-25 2:20 AM
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'
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.