doetoe
Posts: 7
Joined: Wed Nov 02, 2011 1:09 pm

GPIO power limits

Sun Jun 17, 2012 10:27 pm

I tried looking for the power limits of the GPIO pins, mainly to be sure I don't fry my pi. Do I understand correctly that when set as "input", not much can go wrong as long as the voltage is between 0V and 3.3V? And when set as output, how much current can be safely sourced/sunk? Finally, as a reference, are the pins more vulnerable/less protected than those of an Arduino, or are they comparable?
Thanks!

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 14229
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: GPIO power limits

Sun Jun 17, 2012 10:45 pm

Output current of a GPIO is actually programmable, (per pin) but a safe value will be 5mA to either source or sink.

And yes, these GPIO are very comparable to those of an Arduino, they are certainly not any more vulnerable.
But for some the fact that the RPI isn't as easily replaceable as an Arduino makes them slightly... err "paranoid". ;)
There isn't much technical discrepancy between both technologies.
Provided that the Atmega 168 in the arduino is also powered from 3V3, the Atmega isn't comfortable with 5V on its GPIO pins either, as the voltage on any pin may not exceed VCC + 0.5V.
If you take the usual precautions for 3V3 logic that isn't "5V tolerant" then you should be fine.

doetoe
Posts: 7
Joined: Wed Nov 02, 2011 1:09 pm

Re: GPIO power limits

Sun Jun 17, 2012 10:52 pm

Thanks Mahjongg!

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

Re: GPIO power limits

Mon Jun 18, 2012 12:11 pm

There's a table showing the GPIO pin current programmable limits here:

http://www.scribd.com/doc/91353537/GPIO-Pads-Control
Tony

doetoe
Posts: 7
Joined: Wed Nov 02, 2011 1:09 pm

Re: GPIO power limits

Tue Jun 19, 2012 10:51 pm

Thanks! Hadn't seen that. Do you know if the datasheet this page is said to be extracted from is available for download/online viewing?

User avatar
jbeale
Posts: 3893
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: GPIO power limits

Tue Jun 19, 2012 10:59 pm

The main datasheet for the Arm peripherals on the Broadcom BCM2835 SoC:
http://www.raspberrypi.org/wp-content/u ... herals.pdf

Notes, errors and omissions: http://elinux.org/BCM2835_datasheet_errata

The "BCM2835 full data sheet" is not public, and I've seen it claimed by Broadcom employees that it does not exist as a normal datasheet, but rather a loose collection of descriptions of various registers (10s of thousands of registers).

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 14229
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: GPIO power limits

Tue Jun 19, 2012 11:06 pm

The particular datasheet from which this is an extract is only available after signing a NDA from broadcom, and so isn't available to the general public, only this one is:
http://www.alliedelec.com/images/Produc ... asheet.pdf

But that datasheet omitted to address the drive strength of the GPIO, so Gert (who is employed with Broadcom) has sought and been given permission to publish these particular details.


P.S. this data sheet is now also in the repertoire of official hardware documentation: here: http://www.raspberrypi.org/documentatio ... /README.md


see "peripheral section".

User avatar
Grumpy Mike
Posts: 1005
Joined: Sat Sep 10, 2011 7:49 pm
Location: English Lake District
Contact: Website

Re: GPIO power limits

Wed Jun 20, 2012 9:56 pm

mahjongg wrote:Output current of a GPIO is actually programmable,
That is not strictly true. What is programmable is the drive strength, which is more of an output impedance rather than an output current.

The data sheet which we are not allowed to see gives a value of 16mA with an output voltage of 2.3V, sourcing and 17 mA with an output voltage of 0.4V when sinking. These are minimum currents in the DC characteristics page, so they can be considered safe limits.

And before anyone asks, that is the only page I have, and no I can't post, it because it contains a water mark of the company name I obtained it from.

lemming
Posts: 16
Joined: Mon Mar 05, 2012 4:16 am

Re: GPIO power limits

Fri Jun 29, 2012 6:13 am

Thanks Grumpy Mike.

You have spelt out what should have been made clear in the datasheets of the RaspBerry Pi and the publicly available datasheet for the BCM2835. (I have poured through the 205 page datasheet a couple of times thinking I must have missed it).

What kind of madness is it to release an electronics product (especially one targetted at novices) without specifying the current limits on the I/O pins????

It borders on unscrupulous, knowing that users are going to burn out the pins on their RPs without this vital information!

What I can't figure out is why Broadcom and the RP Foundation need to keep the current limits such a secret. Surely this policy runs counter to good customer relations.

They need to take a look at the way Arduino/Atmel do things so as to keep their customers on-side!

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

Re: GPIO power limits

Fri Jun 29, 2012 9:02 am

lemming wrote: What I can't figure out is why Broadcom and the RP Foundation need to keep the current limits such a secret.
This is obviously an oversight rather that deliberate withholding of information. I'm guessing that information wasn't in the GPIO section and was missed.
Hopefully Gert can assemble a version 2 of datasheet with the issues addressed, but remember he has to do this in his free time.

domesday
Posts: 258
Joined: Fri Oct 21, 2011 5:53 pm
Location: UK

Re: GPIO power limits

Fri Jun 29, 2012 9:22 am

It is just unfortunate that Broadcom has such a closed mentality, I fail to see what possible benefit there is to Broadcom to prevent people from making full use of a product they sell by holding back the documentation. It seems to me that people like Gert have had to push Broadcom in to letting him provide as much information as he has and had it not been for the fact that the Pi designers have insider knowledge the Pi would never had been possible. Seemingly Braodcom management want to prevent people from finding innovative uses for their chips and therefore sales.

User avatar
jbeale
Posts: 3893
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: GPIO power limits

Fri Jun 29, 2012 11:12 pm

I suspect it's not the sales particularly (although they seem to only consider millions of units per year to be worth consideration) it's the support time, which is real money not only from overhead but opportunity cost of those engineers not doing something more seemingly profitable. Don't get me wrong though, I'd really, really like to get a more detailed datasheet myself.

lemming
Posts: 16
Joined: Mon Mar 05, 2012 4:16 am

Re: GPIO power limits

Sat Jun 30, 2012 6:31 am

@ dom
This is obviously an oversight rather that deliberate withholding of information. I'm guessing that information wasn't in the GPIO section and was missed.
One only has to look at Grumpy Mikes post (above) to see that there is apprehension about revealing this information. Others have said that they cannot disclose information because they have had to sign an NDA, from Broadcom, to get the information.

This is not an oversight but a deliberate and legal attempt to stop this information getting out!
Truly bizarre behaviour from a commercial enterprise trying to sell a product. I would be interested to know why the RPF switched from Atmel, with its healthy customer support ethic. Maybe pressure from Eben's bosses?

khulat
Posts: 105
Joined: Sun Feb 12, 2012 9:43 pm

Re: GPIO power limits

Sat Jun 30, 2012 7:19 am

lemming wrote:I would be interested to know why the RPF switched from Atmel, with its healthy customer support ethic. Maybe pressure from Eben's bosses?
See this Post which is found on the wiki page about the Hardware History.

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

Re: GPIO power limits

Sun Jul 01, 2012 1:04 pm

Time to step in.
I have not posted anything on this thread to see where it is going.
It is not going anywhere.I see more and more posts with false accusation, slander in the direction of Broadcom
and the members of the foundation all based on totally wrong assumptions and opinions which are not backed by any facts whatsoever.
To me that falls clearly under the chapter 'trolling'.

I wrote a document and posted it which clearly states the power limits of the GPIO.
If that is not sufficient: bad luck.
There seems to be the idea that you get more information under a NDA. I can tell you: that is an illusion.

Thread locked.

Return to “Interfacing (DSI, CSI, I2C, etc.)”