Losing GPIO settings on reboot.

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.
Comments
-
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).
-
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.
Tagged
Categories
- 301 All Categories
- 104 Announcements & News
- 51 Product News - New Product/Product Change Notice/ End-of-life
- 184 Welcome Developers!
- 52 Unboxing & Project Sharing
- 24 Tech Updates
- 550 UP Products
- 1 UP Xtreme i12
- UP Squared Pro 7000
- 1 UP Element i12 Edge
- 11 UP Squared V2
- 26 UP 4000
- 24 UP Xtreme i11
- 34 UP Squared 6000
- 44 UP Squared Pro
- 140 UP Xtreme
- 819 UP Squared
- 1.4K UP Board
- 89 UP Core Plus
- 221 UP Core
- 3 UP Xtreme Lite
- 43 UP AI Edge
- 215 Starter Kits & Peripheral