Skip to main content
Visitor II
June 11, 2021
Solved

Why the "/sys/class/gpio" can't work on STM32MP157C-DK2?

  • June 11, 2021
  • 1 reply
  • 1080 views

Hi,

I test commands

"

echo 97 > /sys/class/gpio/export

echo out > /sys/class/gpio/gpio97/direction

echo 1 > /sys/class/gpio/gpio97/value

echo 0 > /sys/class/gpio/gpio97/value

", the value on the pin PD.1 can't change.

Test command:

"

 gpioset gpiochip3 1=1

 gpioset gpiochip3 1=0

" the value on the pin PD.1 can change.

Please advise how to solve the issue on "/sys/class/gpio".

Thanks,

QiZhang

    This topic has been closed for replies.
    Best answer by Olivier GALLIEN

    Hi @zqizh.1​ ,

    OpenSTLinux is not supporting /sys/class/gpio but only the /dev/gpiochip* devices together with libgpiod.

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

    Olivier

    1 reply

    Technical Moderator
    June 14, 2021

    Hi @zqizh.1​ ,

    OpenSTLinux is not supporting /sys/class/gpio but only the /dev/gpiochip* devices together with libgpiod.

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

    Olivier