Set GPIO direction and value on system boot without scripts
-
We need to some gpio on omega 2s will be on some direction and value on system boot.
May be needed to write overlay..
Anybody can help me to write it correctly?
-
@Moonshiner These documentation articles should be useful:
http://docs.onion.io/omega2-docs/using-gpios.html#from-the-command-line
http://docs.onion.io/omega2-docs/running-a-command-on-boot.htmlIf you need the gpio to be a certain value as soon as the system gets power, then you'll need to modify the bootloader.
The bootloader is open source and available here: https://github.com/OnionIoT/omega2-bootloader
-
@Lazar-Demin TNX!
But what about GPIO43, we need to disable NET LED on it because we use it on UART
I have try search it(GPIO43) on device tree and source with no luck.
Every boot make?devmem 0x10000064 32 0x05550555
not elegant(
-
@Moonshiner Yes, it's not in the DTS
If you want to make the change when the device boots, you can use omega2-ctrl to change the pin multiplexing. See the
ephy
group here http://docs.onion.io/omega2-docs/using-gpios.html#using-gpios-multiplexingHowever, if you're using a more recent version of the bootloader, GPIO43 should be set to act as a GPIO by default. Learn more about checking your bootloader version, the bootloader changelog, and updating it here: http://docs.onion.io/omega2-docs/Web-Recovery-flash-bootloader.html