cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get GPIOs to work

jgauthier
Senior

Hello,

Using the stock image I've found I can manipulate the red LED on PA13 by using gpio commands:

gpioset gpiochip0 13=0
gpioset gpiochip0 13=1

I need to access Pin 38 and Pin 40 on the 40 pin header, which are PI6 and PF11.

These are both tied to the SAI2 device. I removed the device, and the modules and set these pins as outputs and they are unused:

# gpioinfo |grep PI6
        line   6:        "PI6"       unused  output  active-high
# gpioinfo |grep PF11
        line  11:       "PF11"       unused  output  active-high

Manipulation of these is done the same way:

root@stm32mp1:~# gpioset gpiochip5 11=0
root@stm32mp1:~# gpioset gpiochip5 11=1
root@stm32mp1:~# gpioset gpiochip8 6=0
root@stm32mp1:~# gpioset gpiochip8 6=1
 
However, Neither of these pins go "high" and they are always "low".
And since they are set to active-high, like PA13, I would expect them to be "on" at boot.
 
Am I doing something wrong, or do I have a misunderstanding of how this works?

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

Hi,

I assume you are working on STM32MP157x-DK1/2 board.

This is (maybe not clearly) stated on board user manual

0693W00000aJQLHQA4.pngIf you look at board schematics, you will more clearly see these signals used for audio Codec and that the wires going to GPIO connector are 'open' by default.

You need to un-solder relevant 'SB' from Audio side and put the right ones on GPIO side.

0693W00000aJQ3TQAW.png 

0693W00000aJQKJQA4.png 

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'

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

3 REPLIES 3
PatrickF
ST Employee

Hi,

I assume you are working on STM32MP157x-DK1/2 board.

This is (maybe not clearly) stated on board user manual

0693W00000aJQLHQA4.pngIf you look at board schematics, you will more clearly see these signals used for audio Codec and that the wires going to GPIO connector are 'open' by default.

You need to un-solder relevant 'SB' from Audio side and put the right ones on GPIO side.

0693W00000aJQ3TQAW.png 

0693W00000aJQKJQA4.png 

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'

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.
jgauthier
Senior

Thank you! I did not see that in the user manual!

jgauthier
Senior

Thanks @PatrickF​ 

Moving SB2 and SB4 to SB13 and SB15 solved the problem. Lesson Learned (which I've learned before): Check the schematic on these boards because things are not a given,