cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure GPIO on STM32MP157A-DK1 board?

djimel
Associate II

Hello everyone, I use the STM32MP157A-DK1 on my project but I have a problem

1- In the CubeMX, when you want to use a GPIO in output or input, why can not we select the context (cortex A7 or cortex M4)?

0690X000009Z7GIQA0.png

2- When you set a GPIO as an output or input to CubeMX and generate code for SW4STM32, the GPIO you defined is not automatically configured in main.c, can I know why? please

0690X000009Z7GhQAK.png

3- In SW4ST32 (main.c), when you manually set a GPIO and try to flash LEDs that you connect to the PG3 for example, no signal arrives on the PORT, did I make a mistake?

0690X000009Z7HkQAK.png

0690X000009Z7IOQA0.png

BEST REGARDS

1 ACCEPTED SOLUTION

Accepted Solutions
Olivier GALLIEN
ST Employee

Hi @djimel​ 

STM32CubeMX is not yet full feature for STM32MP1 and has a limitation today with configuration of GPIO not linked to a peripheral.

You have to manage it in USER SECTION of the Device Tree.

Take a look at https://wiki.st.com/stm32mpu/wiki/GPIO_device_tree_configuration for some useful information

Hope it help

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
Olivier GALLIEN
ST Employee

Hi @djimel​ 

STM32CubeMX is not yet full feature for STM32MP1 and has a limitation today with configuration of GPIO not linked to a peripheral.

You have to manage it in USER SECTION of the Device Tree.

Take a look at https://wiki.st.com/stm32mpu/wiki/GPIO_device_tree_configuration for some useful information

Hope it help

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
djimel
Associate II

Thanks a lot, its work well now

I found test programme on this link:

https://wiki.st.com/stm32mpu/wiki/How_to_control_a_GPIO_in_userspace

BEST REGARDS