Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Deciphering GPIO on Raspberry Pi B+



thorpej%me.com@localhost said:
> The driver does group individual pin values together into 32-bit registers,
> but these arenâ??t in separate controller units in the hardware, as far as I
> can tell.

I'd be surprised if the silicon guys didn't start with 2 copies of the basic 
block of 32 GPIO pins.


thorpej%me.com@localhost said:
> Well, sure, but there doesnâ??t seem to be any good way of discovering which
> pins are left-overs and thus available for application use; this is the crux
> of the problem.  I need 3 for a chain of 4 shift registers, and a handful
> more for some inputs (with interrupt capability, preferably, but I can poll
> if I have to).  And these all need to be available on the 40-pin header,
> obviously. 

Are you trying to solve a one-off problem so you can go back to working on 
your problem or the general problem so the next guy doesn't have to work so 
hard?

I think the right answer to the general problem is that the pre-boot software 
that sets up the IO devices should provide a bit-mask of bits that are 
available for use as GPIO with the control block for that GPIO device.  I 
don't know if it does that yet.

You maybe able to write a user-land version of the dtb code that would do 
everything but actually configure the hardware and add the leftover pins 
feature to it.  That assumes you can figure out what was input to the real 
dtb code back at boot time.

It might be possible to write some code to try them all and see which ones 
work.  The idea is to write 0s and 1s and see if they read back correctly.  
The builtin pullups may work too well.  I don't know if there is a way to 
turn them off and back on.


mlelstv%serpens.de@localhost said:
> -> https://elinux.org/RPi_BCM2835_GPIOs 

That has a pointer to the hardware documentation.
  http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripheral
s.pdf

---------

I have an Adafruit GPS board handy.  It's got a prototyping area, and labels 
next to a bunch of holes next to the connector.  Some of the labels are 
things like SDA, SCL, TXD, and RXD.  Some are things like #4, #17, #18, #27, 
#22, #23, #24, #25 #5, #6, #12, #13, #16, #19, #20, and #21. I assume those 
are GPIO numbers, but I can't make a match with that list and the URL above.

gpio pins 4 and 18 are used for PPS inputs.

I poked around a bit in Google and didn't find a wonderful answer.

This looks good.  It matches the #list above except it has gpio26 that didn't 
fit on the board.
  https://www.raspberrypi-spy.co.uk/wp-content/uploads/2012/06/Raspberry-Pi-GP
IO-Layout-Model-B-Plus-rotated-2700x900.png

It came from:
  https://www.raspberrypi-spy.co.uk/2012/06/simple-guide-to-the-rpi-gpio-heade
r-and-pins/








-- 
These are my opinions.  I hate spam.






Home | Main Index | Thread Index | Old Index