Omega2 does not turn off unable to use GPIO
-
If i use the consolle I don't can shutdown the system. If I use Terminal also I can't shutdown.
Also I can't use GPIO pins. In consolle I don't can set pin 1 or 0 or input or output. Also when I use fast-led not work.
I read
Segmentation fault
Also When type in terminal
omega2-ctrl gpiomux get
I read:
I unable to open mmap
Why?
-
@Giovanni-Gentile said in Omega2 does not turn off:
If i use the consolle I don't can shutdown the system. If I use Terminal also I can't shutdown.
There is no actual shutdown function, however some versions had a bug where the system would get stuck after resetting and be unable to boot, which looked like a shutdown, and for some purposes was effective as one. That bug has been made less likely by a software change, though the fundamental issue (on a 2+ only) is a hardware one that will turn up if the system resets when it hasn't purposefully prepared itself to.
A good time to remove power would be when the system has rebooted to U-Boot but Linux has not yet started. Otherwise what you are really looking for is a "halt" not a shutdown.
Also I can't use GPIO pins. In consolle I don't can set pin 1 or 0 or input or output. Also when I use fast-led not work.
Try the /sys/class/gpio interface
Also When type in terminal
omega2-ctrl gpiomux get
I read:
I unable to open mmapThe /dev/mem interface is broken in some current builds; if full sources were ever made available, you could fix this by making your own; at present you'd have to try to use alternate sources and fight your way back to the existing functionality, along with fixing that particular issue.
-
@Chris-Stratton said in Omega2 does not turn off unable to use GPIO:
/sys/class/gpio interface
-ash: /sys/class/gpio: Permission denied
-
@Giovanni-Gentile said in Omega2 does not turn off unable to use GPIO:
@Chris-Stratton said in Omega2 does not turn off unable to use GPIO:
/sys/class/gpio interface
-ash: /sys/class/gpio: Permission denied
It's a directory of psuedo-files, not an executable.
You can interact with it with tools like
echo
andcat
or from both high and low level languageshttps://www.kernel.org/doc/Documentation/gpio/sysfs.txt
What may be more challenging is the pin mux - my understanding is that is broken too, so you will only be able to use the pins where the bootup state has set them into GPIO mode, vs. some other function.
-
@Chris-Stratton
This code:
#!/bin/ashconnected
LED_PIN=6fast-gpio set-output $LED_PIN
while true
dofast-gpio set $LED_PIN 1
sleep 1
fast-gpio set $LED_PIN 0
sleep 1
doneresult:
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
-
Indeed, you cannot use fast-gpio as that depends on /dev/mem
And it appears that due to that you also cannot change the pinmux which sets what pins are in GPIO mode vs other modes.
However you can use the /sys/class/gpio interface for those pins that are already in GPIO mode at boot.
-
@Giovanni-Gentile @chris-stratton already told you that the functionality needed by fast-gpio is broken. It doesn't matter if you use it in a script or command-line, it won't work until Onion-devs release a fixed firmware.
-
@Chris-Stratton said in Omega2 does not turn off unable to use GPIO:
@Giovanni-Gentile said in Omega2 does not turn off unable to use GPIO:
@Chris-Stratton said in Omega2 does not turn off unable to use GPIO:
/sys/class/gpio interface
-ash: /sys/class/gpio: Permission denied
It's a directory of psuedo-files, not an executable.
You can interact with it with tools like
echo
andcat
or from both high and low level languageshttps://www.kernel.org/doc/Documentation/gpio/sysfs.txt
What may be more challenging is the pin mux - my understanding is that is broken too, so you will only be able to use the pins where the bootup state has set them into GPIO mode, vs. some other function.
Indeed, you cannot use fast-gpio as that depends on /dev/mem
And it appears that due to that you also cannot change the pinmux which sets what pins are in GPIO mode vs other modes.
However you can use the /sys/class/gpio interface for those pins that are already in GPIO mode at boot.
It's correct. Now I have used this:
gpioctl dirout-high 11
and
gpioctl dirout-low 11the GPIO 11 is free. led blink.
How can I make a new dev/mem?
-
@WereCatf said in Omega2 does not turn off unable to use GPIO:
@Giovanni-Gentile @chris-stratton already told you that the functionality needed by fast-gpio is broken. It doesn't matter if you use it in a script or command-line, it won't work until Onion-devs release a fixed firmware.
When?
-
@Giovanni-Gentile Ask them. I don't work for them.