Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Deciphering GPIO on Raspberry Pi B+
> On Apr 15, 2018, at 1:34 AM, Hal Murray <hmurray%megapathdsl.net@localhost> wrote:
>
> 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’d prefer the latter, of course. :-)
> 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.
I would assume this is available somewhere in the FDT.
> 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.
I’d be happy with just a way to query this using the GPIO ioctl API. It’s kind of annoying that one can’t even query it for any meaningful info at kern.securelevel > 0.
> 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.
I already discovered that e.g. GPIO6 doesn’t seem to work, even though it’s brought out to the header and has a non-interesting set of alternate functions. I settled on GPIO23, GPIO24, and GPIO25 for now (to drive a chain of 74HC595s).
>
>
> 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.
Which Adafuit GPS board, specifically? (I think they make a couple of different ones…)
-- thorpej
Home |
Main Index |
Thread Index |
Old Index