Testing & Setting the USB current limiter on the Raspberry Pi B+




One of the features of the new Raspberry Pi B+ is improved power handling – particularly round the USB interfaces. There is a device connected to the power to the USB ports that is quite clever – it controls the power and “soft starts” the peripherals plugged in. This helps to reduce any brown-outs on the main Pi supply, so reducing the chance of the Pi rebooting when you plug in a USB peripheral with the Pi turned on.

Additionally, it can also limit the total current drawn by the USB peripherals. This is 600mA by default, but can be increased to 1.2A via software.

Testing & Setting the USB current limiter on the Raspberry Pi B+

Warning: DO NOT do this on a whim. Only do this if you are absolutely sure that you need to do it!

But if you do need it, then “How?” I hear you ask… Well, simple… There are 2 ways.

The first way is via a new option in /boot/config.txt. Currently you can add:

safe_mode_gpio=4

but note that this will become:

max_usb_current=1

in subsequent updates. To do that requires a reboot of your Pi, however there is a 2nd way and that’s in software – because the actual switch is controlled via the Pi’s GPIO, we can do it from the command-line after the Pi has booted:

BCM_GPIO pin number 38 is the magic control pin.

Using the wiringPi gpio command, you can do the following:

gpio -g write 38 0
gpio -g mode 38 out

You may think I’m doing this the wrong way round, but you want to make sure you’re not switching it high accidentally, so we make sure the output is going to be low when we force the pin to output mode, and low (or 0) is the default 600mA limit.

 

For more detail: Testing & Setting the USB current limiter on the Raspberry Pi B+




© 2015 Powered By Engineering Projects Team, Raspberry Pi Projects

Scroll to top