On Thursday, 20 December 2018 20:04:17 UTC+2, Tarmo Kuuse wrote: > > On Monday, 3 December 2018 08:35:22 UTC+2, Ken Shirriff wrote: >> >> libgpiod looks like a nice API. I tried it out, but I'm rather baffled by >> the behavior. If I try to set a pin with gpioset, it turns the pin off and >> unexports it. >> >> $ config-pin P8_44 1 # This turns P8_44 on as expected >> $ gpioset gpiochip2 9=1 # Should turn on gpio2[9], i.e. P8_44, but turns >> it off. >> $ config-pin P8_44 1# Now config-pin can't access the pin??? >> WARNING: GPIO pin not exported, cannot set direction or value! >> >> So why does gpioset turn the pin off instead of on? This isn't specific >> to P8_44; for instance "gpioset gpiochip2 7=1" will mess up P8_46 >> (gpio2[7]). This also happens even if I don't use config-pin, so it's not >> config-pin messing things up. >> > > I'm also having problems with libgpiod - it simply does not work on a BBB > with kernel 4.14.71-ti-r80. Cape universal is disabled, relevant pins are > not exported via sysfs gpio interface. > > Example: I'm trying to set P9.23 a.k.a. gpio number 49 (gpiochip 1, pin > 17) and absolutely nothing happens. The pin stays in some high-z state, > measuring 0.6 volts: > $ sudo gpioset gpiochip1 17=0 > $ sudo gpioset gpiochip1 17=1 > > Running "gpioinfo gpiochip1" shows my pin as output, while it's definitely > not that: > ... > line 17: "GPMC_A1" unused output active-high > ... > > Also tried to control each of the user LEDs on pins 21-24 on the same port > with very strange results. I managed to switch on usr1 or usr2 and no > further changes are possible - the one LED won't turn off and the others > won't turn on. Also wrote a small C program which uses the "linux/gpio.h" > API - doesn't do anything useful to any of the pins. > > Am I missing something here? >
And the usual sysfs interface on the same works just fine. Verified with a multimeter. # echo 49 > /sys/class/gpio/export # echo low > /sys/class/gpio/gpio49/direction # echo high > /sys/class/gpio/gpio49/direction -- Kind regards, Tarmo Kuuse -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/81ef87e8-ea04-4d4c-87be-bdbefc2a273e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
