7 Replies Latest reply: Jan 23, 2013 6:24 AM by obcd RSS

USB Thumb Drive Causing Reboots

GeorgeIoak Level 4

I know this has been discussed both here and over on the RPi forums. A lot of talk has gone into the power rails but I haven't seen anyone definitely finding what actually causes the RPi to reboot. I have a "newer" Rev 1 board which has zero ohm resistors at the USB power lines. By adding extra capacitance I can eliminate the reboots but the drive is not always enumerated.

 

Measuring on the scope I can see the 5V rail dip a bit but the 3.3V and 1.8V appear to be stable. I'm powering the RPi through the GPIO header so that would bypass the F1 fuse at the incoming rail.

 

I'm wondering if I'm missing something glitching on the 1.8V rail or is this some type of kernel error causing the reboot? I don't see anything in the log files but I'm also not a Linux guru so maybe I'm not looking in the right places. I did ask this question the other day on the RPi forums but it seems like more engineers hang out here so I'm hoping to eliminate the fluffy comments and opinions.

 

If I missed this somewhere I apologize but hope you'll point me to the right thread.

 

I haven't torn apart a Roku2 but I see that it uses the same LAN9512 and BCM2835 so I'd be curious to see how they did their layout. I can see limiiting the current with the poly fuses but once those are gone and you have a supply with plenty of current and a strong rail I don't see why inserting a drive should cause a reboot. Perhaps this is all related to the problem of the LAN9512 1.8V output tied to the RPi 1.8V rail?

 

Looking forward to hearing what this community has to say!

  • 1. Re: USB Thumb Drive Causing Reboots
    msilveus Level 3

    Hi George,

     

    One way to troubleshoot the problem is connect your thumb drive through a powered USB hub to eliminate the possiblity that you are pulling too much current away from the RPi. The biggest clue is that you are seeing a dip in the 5V rail which can cause the RPi to reboot if it goes below a certain threshold point.even for just a moment.

     

    Mike

  • 2. Re: USB Thumb Drive Causing Reboots
    wallarug Level 15

    This is a known issue on the rev2 board.  It fails to reach USB hotplug standards.

     

    The issue is when you connect the device,It draws too much current...which then causes the raspberry pi to restart.

     

    As Mike said above, the only way to counter the issue is to use a powered hub.

  • 3. Re: USB Thumb Drive Causing Reboots
    Colin Barnard Level 7

    A USB device should not ask for more than 100mA when first attached, only once the host has satisfied itself that the correct configuration file has been read, can the  device request more current.

     

    What happens if the drive is powered externally? - Whoops o course a thumb drive doesn't have external power - that'll teach me not to read fully.

     

    What might happen is that the network data gets priority over the USB data as the netowkr chip is both LAN and USB combined and the chip suddenly uses more power causing a glitch.

     

     

     

    Colin

     

    Message was edited by: Colin Barnard

  • 4. Re: USB Thumb Drive Causing Reboots
    mitchtech Level 1

    I had a similar issue with USB devices while powering the Raspberry Pi from the GPIO headers.  I was able to overcome the issue by directly connecting the 5V and GND of the GPIOs to the 5V and GND of the USB.  The attached image is of a modified rev1 board, but should also work the same for the rev2 board.  Not exactlty the most elegant of solutions, but it was just the quick and dirty fix I needed.

     

    raspi-modified.jpg

  • 5. Re: USB Thumb Drive Causing Reboots
    John Beetem Level 15

    bodgy wrote:

     

    A USB device should not ask for more than 100mA when first attached...

     

    What might happen is that the network data gets priority over the USB data as the netowkr chip is both LAN and USB combined and the chip suddenly uses more power causing a glitch.

    I think it's most likely good old charge sharing.  When you plug in a USB device with a large discharged 5V capacitor RasPi's capacitors have to provide a big current to make all capacitor voltages equal.  If the USB device's capacitor is too large, the transferred charge causes RasPi's 5V to glitch low.  This didn't happen much on Rev 1 RasPi's since polyfuses F1 and F2 slowed the charging of the plugged-in capacitor.

     

    I saw this many years ago with BeagleBoard rev B4 and wrote up a theory about it.

  • 6. Re: USB Thumb Drive Causing Reboots
    John Beetem Level 15

    Michael Mitchell wrote:

     

    I had a similar issue with USB devices while powering the Raspberry Pi from the GPIO headers.  I was able to overcome the issue by directly connecting the 5V and GND of the GPIOs to the 5V and GND of the USB.

    It's kind of scary that adding the wires fixed the problem.  After all, with a rev 2.0 or an Ohmless rev 1.0 the GPIO 5V and GND pins are directly wired to the USB jack according to the schematics.  The fact that adding wires changes behaviour suggests that the 5V trace to GPIO is pretty narrow.  Sure would be nice to see those Gerbers

  • 7. Re: USB Thumb Drive Causing Reboots
    obcd Level 1

    The soc has direct connections to the 5V rail. Maybe it has a buildin brownout detection that resets the soc when it sees a voltage dip on the 5V

    If you look at the Olimex board, you will see some 100uF capacitors close to the usb connectors.

    They also have a MIC2026-1BMMIC2026-1BM chip in the power lines and a coil. That last one might limit the surge current when a device is plugged in. The MIC allows to switch the usb device power off so that a device can be enumerated without restarting the board.

    The Pi is cheaper....but you only get what you payed for...