strebor27
Posts: 6
Joined: Sat Sep 28, 2013 4:43 pm

set gpio drive strength

Thu Oct 10, 2013 7:37 pm

I've been searching for a few days now but it has been unsuccessful. How do you set the output strength of a gpio pin? at current I am using gpio 24, a multimeter indicated a current of about 40ma (think this is due to only the 1 pin being in use). I want to be able to adjust it to about 10ma

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: set gpio drive strength

Thu Oct 10, 2013 9:41 pm

strebor27 wrote:I've been searching for a few days now but it has been unsuccessful. How do you set the output strength of a gpio pin? at current I am using gpio 24, a multimeter indicated a current of about 40ma (think this is due to only the 1 pin being in use). I want to be able to adjust it to about 10ma
If you need less than it is capable of providing I do not understand what the problem is.

If you are woried about drawing to much current do to a design that could provide a dead short then add an apropriate resistor.

If you want to step it up use a line driver.

I do not think that you can directly change the Drive strength of GPIO.

I have never woried about it as everything that I am doing goes through either a Line driver, a Buffer, or a Buss driver.

Is there another issue that I am somehow missing?
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

User avatar
Burngate
Posts: 6313
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: set gpio drive strength

Fri Oct 11, 2013 9:49 am

The following might be of interest:
Main GPIO how-to: http://www.raspberrypi.org/wp-content/u ... herals.pdf
Errata: http://elinux.org/BCM2835_datasheet_errata
Elaboration of GPIO drive: http://www.scribd.com/doc/101830961/GPIO-Pads-Control2
The last is the the bit you need for drive-strength

Note that the drive-strength is not the maximum current a pad will drive into a short circuit; it's only the maximum current that guarantees the desired logic level.
So reducing the drive-strength won't reduce that 40mA short-circuit current, and it won't prevent the SoC from dying.

Return to “Bare metal, Assembly language”