Losing GPIO settings on reboot.

dryfly101dryfly101 New Member Posts: 2

Hello,
I've got my gpios working as expected until I reboot and then they are lost. Sure, I could initialize them every boot, but I feel like this might be indicative of some other issue.
Any idea what might be going on or what I could check? I've got the susv and global cellular hat working and connected as well. Could they be interfering at boot even though they all work after I reconfigure the gpios.
Ubuntu with the UP kernel
I'm using gpio 22 though /sys/class/gpio/export,then setting the direction and the value in /sys/class/gpio/gpio22/direction and .../value
When I reboot, /sys/class/gpio/gpio22 does not exist.
Thanks in advance.

Tagged:

Comments

  • DCleriDCleri Administrator, AAEON Posts: 1,004 admin

    it is a normal behaviour also for other platforms.

    You should create a script to initialise the GPIO the way you need and add it as a service on startup (systemd service as you are using Ubuntu).

  • dryfly101dryfly101 New Member Posts: 2

    Ok. Thanks for the information. I set that up shortly after my post. Appreciate the quick reply. Maybe a note in the gpio docs regarding that would save someone else some time.

Sign In or Register to comment.