GPIO on the RockPro64 - all pins high?
#1
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
  Reply
#2
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.

Occasional Linux Kernel Contributor, Avid Wiki Updater, Ask Me About Quartz64
Open Hardware Quartz64 Model A TOSLink Adapter
Pi-bus GPIO Extender For ROCKPro64 And Quartz64 Model A
Plebian GNU/Linux
  Reply
#3
(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!
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Powering on the Rockpro64 JPT223 1 826 09-24-2023, 12:23 PM
Last Post: hoarfrosty
  ROCKPro64 Battery Power Supply hoarfrosty 11 1,629 09-23-2023, 04:17 PM
Last Post: hoarfrosty
  ROCKPro64 with 16 ports SATA controller ZeblodS 19 25,270 12-18-2022, 06:25 PM
Last Post: heyghoge
  Using RPI hat on RockPro64? misterc 0 798 12-16-2022, 02:05 PM
Last Post: misterc
  ROCKPro64 DOA ajtravis 8 6,355 11-08-2022, 03:40 AM
Last Post: ajtravis
  RockPro64 not booting up mvicha@gmail.com 0 1,093 09-19-2022, 07:35 AM
Last Post: mvicha@gmail.com
  GPIO Expander HAT for ROCKPro64 and Quartz64 CounterPillow 7 5,192 07-18-2022, 10:05 PM
Last Post: zer0sig
  RockPro64 premium aluminium casing justwantin 2 2,073 05-27-2022, 06:51 PM
Last Post: justwantin
  charging 3 rockpro64 from single source rpt312 1 1,666 05-16-2022, 02:34 AM
Last Post: dukla2000
  help or suggestions removing RockPro64 Playbox please? jahway603 2 2,297 03-22-2022, 12:17 PM
Last Post: jahway603

Forum Jump:


Users browsing this thread: 1 Guest(s)