rickyjames
Posts: 80
Joined: Wed Sep 07, 2011 6:16 pm

Re: GPIO Header Pinout Clarification

Sun Feb 12, 2012 4:03 pm

I thought I would share what I have worked out just what the GPIO header pins are now that the Broadcomm BCM2835 datasheet is out – the final key to the puzzle.  There have been three releases of data here at raspberrypi.org on the GPIO bus that has been built into the Rpi, and they are not at all consistent with each other – in fact, the main one is unintentionally a little misleading.

First, there was Liz's main post dated Nov 24, "Pinout for GPIO Connectors":

http://www.raspberrypi.org/archives/384

where she lists the pins as:

Top row, left to right:

5V0
DNC
GND
TXD
RXD
GPIO1
DNC
GPIO4
GPIO5
DNC
GPIO6
SPI_CE0_N
SPI_CE1_N

Bottom row, left to right:

3V3
SDA0
SCL0
GPIO7
DNC
GPIO0
GPIO2
GPIO3
DNC
SPI_MOSI
SPI_MISO
SPI_SCLK
DNC

Liz also notes that some of the specialized-functions pins can all be reassigned as GPIO pins.   So far so good – except she has established a numbering scheme of GPIO0 – GPIO7 for the non-special-function pins.  This is a potential gotcha if you start actually designing something…

Now we've got the Broadcomm data sheet fot the GPIO pins:

http://dmkenr5gtnd8f.cloudfron.....herals.pdf

And on page 102-103 we see that there are potentially 32 GPIO pins.  However, according to Liz's list, only 17 of them have been brought out on a header to be accessable to the outside world.  That's OK, there's no way all 32 could have made it out on 0.1 inch header on such a small board, we're lucky we got any of them out at all…

But…wait a minute.  Liz says the SDAO/SCL0 pins are next to the 3.3 volt pin.  The data sheet says SAD0/SCL0 are I2C bus lines on GPIO0/GPIO1.  But Liz says GPIO0/GPIO1 are in the row with the 5V pin, not the 3.3V pin.  So…does that mean the SDA0/SCL0 are using the GPIO28/GPIO29 option allowed by the data sheet?  Is GPIO28 next to the 3.3V pin?

Nope.  We've got photos of the Gertboard, our third piece of info:

http://www.raspberrypi.org/archives/411

If you embiggen the Gertboard photos and look closely at his silkscreen for GPIO pins, there is no GPIO28 or GPIO29 brought out from the header.  Which means that the datasheet GPIO0 pin is actually right next to the 3.3V pin denoted as SDA0 (one of its many potential specialized functions) and Liz's GPIO0 is actually the datasheet GPIO17.  How do I know this?  By following the traces on the Gertboard to his silkscreen GPIO markings.

Gert lists the following GPIO pins, apparently by their datasheet numbers:

0,1,4,7,8,9,10,11,14,15,17,18,19,20,21,22,23

So these are the 17 of the 32 GPIO pins that are actually pulled off of the chip and exposed to the outside world via the Rpi header.

And left to an exercise for the reader is to follow Gert's traces to the corresponding silkscreen holes to come up with the following:

Raspberry Pi GPIO Header Pinout With Broadcomm Datasheet Page 102-103 Numbering:

5V XX GD 14 15 18 XX 21 22 XX 23 08 07

3V 00 01 04 XX 17 19 20 XX 10 09 11 XX

…where XX are DNC = Do Not Connect pins.

Oh, another potential gotcha...the board apparently isn't the ISO 7810 standard size of 85.60 mm by 53.98 mm for ID-1 cards like credit cards as stated in the Raspberry Pi FAQ; Gert has apparently measured a beta board at 85 mm by 56 mm.  He's posted a diagram at scribd:

http://www.scribd.com/doc/77785093

Happy hardware designing.

kasperl
Posts: 90
Joined: Fri Jan 06, 2012 6:20 pm

Re: GPIO Header Pinout Clarification

Sun Feb 12, 2012 4:14 pm

Would this mean that 18-21 could be used as I2S/PCM as on page 102, alt function 0?

Gert rather explicitly told us that those pins were cut, but it would be great if we could acces them somehow.

User avatar
Gert van Loo
Posts: 2486
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: GPIO Header Pinout Clarification

Sun Feb 12, 2012 4:43 pm

BEWARE! I based the version 1 of the Gertboard on the schematics I had at the time. I did not know that the Berta board had two GPIO pins swapped. So some of the GPIO numbers you see on the Gertboard silkscreen are wrong.

I am in the Netherlands so I do not have the full database available here. If I recall correctly GPIO19 and GPIO20 are not on the connector. Instead GPIO 24 and GPIO25 are. If I am not mistaken that makes the complete list: 0,1,4,7,8,9,10,11,14,15,17,18,21,22,23,24,25.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5378
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: GPIO Header Pinout Clarification

Sun Feb 12, 2012 4:57 pm

Looks correct Gert. I came up with same list in comment here:

http://www.raspberrypi.org/archives/615

rickyjames
Posts: 80
Joined: Wed Sep 07, 2011 6:16 pm

Re: GPIO Header Pinout Clarification

Sun Feb 12, 2012 7:23 pm

Thanks for the feedback, this is exactly the kind of discussion I wanted to flush out here.  So, logical questions:  Which is next to GPIO17 pin on the header, GPIO24 or GPIO25?  And the "other" one is next to the XX=DNC pin, right?

rickyjames
Posts: 80
Joined: Wed Sep 07, 2011 6:16 pm

Re: GPIO Header Pinout Clarification

Sun Feb 12, 2012 7:32 pm

Kasperl said:


Would this mean that 18-21 could be used as I2S/PCM as on page 102, alt function 0?

Gert rather explicitly told us that those pins were cut, but it would be great if we could acces them somehow.


Based on the discussion below, my writeup above still isn't correct.  According to Gert we got GPIOs 24 and 25 instead of 19 and 20 and that's why we don't get PCM.  I wonder if this was unintentional during PCB layout - it would have been much more logical to include 19 and 20 and get the full PCM setup instead of 24 and 25 and lose it for nothing tangible in return. If this is so, anybody think it's worth pushing for a fork in the Rpi hardware and coming up with a new layout that includes 19&20 = PCM starting with board 10,001 ???

kasperl
Posts: 90
Joined: Fri Jan 06, 2012 6:20 pm

Re: GPIO Header Pinout Clarification

Sun Feb 12, 2012 7:48 pm

The removal of I2S has been discussed here: http://www.raspberrypi.org/for.....hange-made

Liz mentioned in that thread that it might be possible to change this in future revisions, and Gert said it might be possible to de-solder some resistors for the board revision data and tap those for I2S, but there's no word on that actually working or being possible.

User avatar
Gert van Loo
Posts: 2486
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: GPIO Header Pinout Clarification

Sun Feb 12, 2012 9:31 pm


and Gert said it might be possible to de-solder some resistors for the board revision data and tap those for I2S, but there's no word on that actually working or being possible.


Oh it is definitely possible and I am sure it will work, but most users would find that too complex. They would want only to plug in an extension board. Even that would be a problem as the GPIO header is default not on the boards. I see a market for "Raspi-extension header adding service"

My guess would be that for a future version we try to get the GPIO19/20 on some of the DNC pins.

hzrnbgy
Posts: 106
Joined: Mon Dec 26, 2011 10:55 pm

Re: GPIO Header Pinout Clarification

Mon Feb 13, 2012 2:52 am

I just had a prototype expansion header manufactured. Im only interested with the SPI, UART, GND, 5V0, and 3V3 pins, are these pins still on the correct location as far as what Liz said on the first post?

User avatar
Mike Lake
Posts: 106
Joined: Sun Feb 12, 2012 11:45 am
Contact: Website

Re: GPIO Header Pinout Clarification

Mon Feb 13, 2012 9:36 am

Could we get a clear statement from the team about header or no header for GPIO on this first batch of 10,000?  I think Gert has said "no header" but are we 100% sure?

We want kids to get into controlling things (because that's the fun bit - making things happen) but do we really expect them to solder a header to a PCB?  (I know this first batch is not for the education market.)

We split into three types: hardware types who see software as a necessary evil, software types like me who see hardware as stuff that goes wrong and those who are totally happy with both (most of the people on these forums I think.)

I am sure a lot of people who want to develop software (and make things happen) don't feel at all comfortable with a soldering iron.  (I ask a colleague to do all the spanner stuff - especially if it comes to hand-soldering SMT processors - but he draws the line at BGA!)

If we see the R Pi as a low-cost, everyone-can-have-one, development platform, is there room for an intelligent controller connected to GPIO rather than, or as well as, a long daisy chain of little boards?  This would allow interactive development while connected to R Pi, stand-alone when ready.
Life's single regret: not patenting dongles when we invented and named them to protect the Wordcraft word processor on the Commodore PET!

You can buy 31 RPi3s for the £639 price of one Samsung Galaxy S7 Edge smart phone - who buys this stuff?

User avatar
walney
Posts: 233
Joined: Wed Nov 30, 2011 6:57 pm
Contact: Website

Re: GPIO Header Pinout Clarification

Mon Feb 13, 2012 10:10 am

"No header" has been stated repeatedly - though probably a long time ago

So if you want one then it's "solder it yourself," but that does give the option of male/female and bottom/top to suit.

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: GPIO Header Pinout Clarification

Mon Feb 13, 2012 10:19 am

Mike Lake said:


If we see the R Pi as a low-cost, everyone-can-have-one, development platform, is there room for an intelligent controller connected to GPIO rather than, or as well as, a long daisy chain of little boards?  This would allow interactive development while connected to R Pi, stand-alone when ready.


It's called an Arduino, and it plugs into the USB port. I can't think of a reason you would want to plug something like that into GPIO. GPIO is for I/O, which implies that the RaspPi is doing something intelligent. So if you run standalone you are missing whatever it is that the RaspPi was doing. If all you need is to program and debug the controller, then USB/serial is perfectly adequate and simpler to interface to.

Having said that, the Gertboard has a micro-controller on it, so it could operate like that.

rickyjames
Posts: 80
Joined: Wed Sep 07, 2011 6:16 pm

Re: GPIO Header Pinout Clarification

Mon Feb 13, 2012 2:21 pm

So...I still don't know what datasheet GPIO number goes to what specific header pin for all header pins.

Could somebody in the Rpi inner circle post and bless with holy water a diagram like this:

5V XX GD -- -- -- XX -- -- XX -- -- --

3V -- -- -- XX -- -- -- XX -- -- -- XX

where the "--"s are replaced by the datasheet GPIO numbers from page 102-103?

And maybe pin this discussion to the top of the Projects topics, since everybody embarking on an expansion board project at any time in the future is going to need the same info?

User avatar
tzj
Posts: 302
Joined: Thu Jan 05, 2012 3:09 pm
Location: Barnsley, SY, UK

Re: GPIO Header Pinout Clarification

Mon Feb 13, 2012 8:50 pm

I"d like to know that too... or they could make us wait. :p
http://www.themagpi.com <---- Checkout the MagPi
(The MagPi - Co-Founder)

User avatar
TonyD
Posts: 448
Joined: Thu Sep 08, 2011 10:58 am
Location: Newcastle, UK
Contact: Website

Re: GPIO Header Pinout Clarification

Tue Feb 14, 2012 1:08 pm

yes, it would be great if we could get the pinouts for the header confirmed
Tony

nullstring
Posts: 178
Joined: Sun Oct 02, 2011 3:05 pm

Re: GPIO Header Pinout Clarification

Tue Feb 14, 2012 5:55 pm

Gert said:



and Gert said it might be possible to de-solder some resistors for the board revision data and tap those for I2S, but there's no word on that actually working or being possible.


Oh it is definitely possible and I am sure it will work, but most users would find that too complex. They would want only to plug in an extension board. Even that would be a problem as the GPIO header is default not on the boards. I see a market for "Raspi-extension header adding service"

My guess would be that for a future version we try to get the GPIO19/20 on some of the DNC pins.


Gert,
I asked this in the I2S thread, but perhaps you didn't see it.

Could you tell us which resistors you happen to be talking about for I2S?

We need 28,29,31... it looks like.Are we able to get these from R15, R16, R17?

(R18 seems to be something else)

Any further information you can provide would be appreciated.

rickyjames
Posts: 80
Joined: Wed Sep 07, 2011 6:16 pm

Re: GPIO Header Pinout Clarification

Tue Feb 14, 2012 8:38 pm

nullstring said:



We need 28,29,31... it looks like.Are we able to get these from R15, R16, R17?

(R18 seems to be something else)

What are you looking at to make this determination?  Schematics?  Gerber photos?  Alpha board?

User avatar
Gert van Loo
Posts: 2486
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: GPIO Header Pinout Clarification

Tue Feb 14, 2012 9:03 pm

rickyjames said:


nullstring said:



We need 28,29,31... it looks like.Are we able to get these from R15, R16, R17?

(R18 seems to be something else)

What are you looking at to make this determination?  Schematics?  Gerber photos?  Alpha board?




From the official Beta Board schematics of course

GPIO 28,29,30,31 are connected to (R8/R10, R7/R9, R4/R6, R3/R5) in that order.

rickyjames
Posts: 80
Joined: Wed Sep 07, 2011 6:16 pm

Re: GPIO Header Pinout Clarification

Tue Feb 14, 2012 9:20 pm

So, Gert, since you"re looking at schematics (which aren"t publicly available, yet, right?  Or did I miss something?) can you verify the header pinout below as accurate with respect to Datasheet pg 102-103 GPIO numbering and in particular verify the correct location of GPIO24 and GPIO 25?

5V XX GD 14 15 18 XX 21 22 XX 23 08 07

3V 00 01 04 XX 17 24 25 XX 10 09 11 XX

User avatar
Gert van Loo
Posts: 2486
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: GPIO Header Pinout Clarification

Wed Feb 15, 2012 6:38 pm

rickyjames said:


So, Gert, since you"re looking at schematics (which aren"t publicly available, yet, right?  Or did I miss something?) can you verify the header pinout below as accurate with respect to Datasheet pg 102-103 GPIO numbering and in particular verify the correct location of GPIO24 and GPIO 25?

5V XX GD 14 15 18 XX 21 22 XX 23 08 07

3V 00 01 04 XX 17 24 25 XX 10 09 11 XX



Sorry, have been traveling and had very little time. I also suffer from the 'recent update' auto-you-read-this error. That is: If I do not open a "New/Recently updated Topics" the next time(days?) they all seem to be set to 'you have read these'.

As usual: No guarantees as I can make errors as anybody who works:

1 = 3V3       2 = 5V
3 = GPIO0    4 = -
5 = GPIO1    6 = GND
7 = GPIO4    8 = GPIO14
9 = -           10=GPIO15
11=GPIO17   12=GPIO18
13=GPIO21   14=-
15=GPIO22   16=GPIO23
17=-            18=GPIO24
19=GPIO10   20=-
21=GPIO9    22=GPIO25
23=GPIO11   24=GPIO8
25=-            26=GPIO7

Final warning do NOT absolutely not connect anything to the pins which are marked as XX. These pins are connected on the Betaboard but reserved for signals on the next version(s). You may (read: probably will) damage your board or the raspi board if you connect to them.

Finally: No the schematics are not yet public available. I leave that to Eben to release.

User avatar
TonyD
Posts: 448
Joined: Thu Sep 08, 2011 10:58 am
Location: Newcastle, UK
Contact: Website

Re: GPIO Header Pinout Clarification

Thu Feb 16, 2012 1:23 pm

Gert, thanks for clarifying the pinouts. I can get some proto boards finished now
Tony

mole125
Posts: 228
Joined: Tue Jan 10, 2012 2:01 pm

Re: GPIO Header Pinout Clarification

Sat Feb 18, 2012 11:39 pm

I've updated the wiki with this information http://elinux.org/RPi_Low-leve......28GPIO.29

it may be worth someone checking I have copied the information across correctly!

User avatar
tzj
Posts: 302
Joined: Thu Jan 05, 2012 3:09 pm
Location: Barnsley, SY, UK

Re: GPIO Header Pinout Clarification

Sun Feb 19, 2012 12:43 am

its good
http://www.themagpi.com <---- Checkout the MagPi
(The MagPi - Co-Founder)

rickyjames
Posts: 80
Joined: Wed Sep 07, 2011 6:16 pm

Re: GPIO Header Pinout Clarification

Wed Feb 22, 2012 3:49 am

Could an admin please pin this discussion to the top of the "projects" subforum?  The GPIO pinout documented by Gert a few posts above is the ONLY place in the entire RPi website where the GPIO pins are correctly correlated with the datasheet GPIO numbering system.  This is CRITICAL information for anybody starting out on a board design project and should not be allow to sink and get lost deep in the project subforum.   The correct GPIO pin numbering is at least as important as the board mechanical data Gert also has identified, which is pinned to the top of the project subforum.

This correct pinout perhaps deserves a mention in the FAQ, too...

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: GPIO Header Pinout Clarification

Fri Feb 24, 2012 4:04 pm

Looking at the Gert-approved pinout against page 102 of the datasheet, it looks like we're only short ARM_TMS in order to have a JTAG interface.  As Gert has suggested there might be ways of getting to GPIO18-21 in order to get to I2S (presumably using assignment ALT3 on those pins?), might there be a similar way of getting to either GPIO12 or GPIO27?

Simon

Return to “Other projects”