PINE64
GPIO on the RockPro64 - all pins high? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCKPRO64 (https://forum.pine64.org/forumdisplay.php?fid=98)
+--- Forum: RockPro64 Hardware and Accessories (https://forum.pine64.org/forumdisplay.php?fid=102)
+--- Thread: GPIO on the RockPro64 - all pins high? (/showthread.php?tid=17538)



GPIO on the RockPro64 - all pins high? - colinmarc - 10-30-2022

Hi everyone,

I'm playing around with my brand new RockPro64 and trying to blink an LED using libgpiod. I have pin 24 hooked up to an LED, and no matter what I do, the LED is (dimly) lit. That's despite the fact that `gpioinfo` shows all the pins:


Quote:gpiochip4 - 32 lines:
        line  0:      unnamed      unused  input  active-high
        line  1:      unnamed      unused  input  active-high
     
        line  23:      unnamed      unused  input  active-high
        line  24:      unnamed      unused  input  active-high
        line  25:      unnamed      unused  output  active-high  # I've been trying to switch this pin on and off.

What's even weirder, every GPIO pin seems to be pushing a few volts out, even the ones marked GND in the diagram (for example, pin 6). To be specific, if I connect a jumper cable from PIN 6 to an LED/resistor and then to ground, the led lights up. 

Did I break something? Is there something I'm missing? I'm wondering if it has to do with u-boot, which I've flashed to SPI in order to support booting from a generic Manjaro image.

Thanks in advance for the help!
Colin


RE: GPIO on the RockPro64 - all pins high? - CounterPillow - 11-01-2022

That's because you didn't set a pull-down biasmode on the GPIOs, which by default I believe leaves them pulled up.

You can set them to pull-down bias with:

Code:
gpioset --bias=pull-down chipnum pinnum=value

There's probably also a way to set this from the device tree, but I don't know it off-hand.

In short, no, you didn't break anything.

Pin 6 should be an actual ground though, that's suspicious.


RE: GPIO on the RockPro64 - all pins high? - colinmarc - 11-18-2022

(11-01-2022, 10:13 AM)CounterPillow Wrote: That's because you didn't set a pull-down biasmode on the GPIOs, which by default I believe leaves them pulled up.

You can set them to pull-down bias with:

Code:
gpioset --bias=pull-down chipnum pinnum=value

There's probably also a way to set this from the device tree, but I don't know it off-hand.

In short, no, you didn't break anything.

Pin 6 should be an actual ground though, that's suspicious.

Hi, thanks for the help! I redid the wiring and tried your suggestion and now it's working!

What's odd is that connecting the LED to the GPIO GND in the circuit (ie the RockPro64's GND) works, but using the GND on my breadboard (connected to another microcontroller or a common ground, same thing) doesn't seem to work. I guess I'm missing something basic about GPIO or microcontrollers, which is maybe outside the scope of this board.

Thanks again!