[Resolved]Omega2+ GPIO Pins Not Set



  • Using Omega2+ with Device Firmware Version: 0.1.9 b149 on a Power Dock

    gpioctl get 6
    Using gpio pin 6.
    Pin 6 is LOW // but voltage on pin is HIGH
    gpioctl dirout-low 6 // still HIGH

    So although software indicating everything is fine the hardware is not changing as it should.

    Is there something I am missing?



  • Hi,

    Some of the pins have different modes:

    alt text

    They need to be set as GPIO in order to work as you want to. The easiest, or I think so, way to set them is:

    omega2-ctrl gpiomux set groupofpins gpio

    You can see it explained here: https://docs.onion.io/omega2-docs/using-gpios.html

    However, I think that omega2-ctrl doesn't work with the current firmware. You have to install an older version, wait till they fix /dev/mem in a future release or make your custom image. Of course, I think you can also write directly into the memory the behaviour of the pins.



  • @RogerM said in Omega2+ GPIO Pins Not Set:

    Using gpio pin 6.
    Pin 6 is LOW // but voltage on pin is HIGH
    gpioctl dirout-low 6 // still HIGH

    MT7688 GPIO6 shares a pin with the /CS1 signal that could be used to select an SPI peripheral (fortunately it is the other select, /CS0, which select the internal flash holding the system).

    You may need to look at both the pinmux and device tree. My impression is that it is possible for device tree entries configuring this pin for SPI to prevent you from using it as GPIO in Linux the "right way" but it may still be possible to directly set the hardware pinmux registers, below the level of the drivers (question would be if the drivers will then set them back to what they think the state should be).

    Could you perhaps pick another pin?



  • Thank you, I had thought all the GPIO labeled pins (green) could be used as GPIO which I guess is true if omega2-ctrl gpiomux worked. GPIO 11 works as I expect.


Log in to reply
 

Looks like your connection to Onion Community was lost, please wait while we try to reconnect.