Jump to content

Orange Pi 3 LTS gpiod line out of range


Go to solution Solved by jernej,

Recommended Posts

Posted

Hello,

 

 I'm turning my head around this problem, I have read numerous forum posts and docs but I didn't found an answer:

 

Following https://linux-sunxi.org/GPIO, the same pin number calculation applies for sysfs and gpiod.

But, for example, for PL2 it will be 11*32+2=354, or for opi3 lts there are only 255 line numbers for gpiochip1 (as per `gpioinfo gpiochip1`)    :-S

Pleeease tell me what am I missing !?!

  • Solution
Posted

That wiki article is missing explanation how to calculate pin number in case of multiple pin controllers. PL2 is on second controller, where first port is "L". So pin number calculation is actually 0 * 32 + 2 = 2.

Posted

Thank you! I wouldn't find this by myself in a 1k years !!! (how did you?)

 

In fact.. to add assault...  gpiochip1 is the first chip and gpiochip0 is the second...

So PL2 is line 2 on gpiochip0

eat this! :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines