This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

USB Host Power problem with device plugged in on boot

Other Parts Discussed in Thread: TPS2051

Hello -I am using a beaglebone black (ubuntu), and the USB host power does not initialize properly when something is plugged into the port on bootup. 
The USB device I am trying to use draws only a small current, and it works just fine to hot-plug, but will not work when it is plugged in on boot (coldplug?). 

I tried it both with the BBB powered from the USB client, and then with a lab-grade external supply. 
Unplugging the device and plugging back in does nothing.  -Only a reboot of the BBB and a hotplug will work.

There is an additional line when running 'dmesg' for the case where the USB does not work:
"dsps_interrupt 370: VBUS error workaround (delay coming)"

I don't really understand what this error is, or how to correct it.  I assume it is not detecting the correct voltage at the correct time?

Thanks

  • Nathan Maresch said:
    but will not work when it is plugged in on boot (coldplug?).

    Please try modify the 8-bit register by 'devmem2 0x47401c60 b 1' to see if the device got enumerated.

    Nathan Maresch said:
    "dsps_interrupt 370: VBUS error workaround (delay coming)"

    This message usually means the device drains too much current and droops VBUS down below the valid threshold. Please try to increase the VBUS capacitor (C34), for example, to 150uF.

  • Thank you very much for the information -here is what is displayed for each case (I don't know what the register values indicate):

    Output with USB Device Plugged in on Boot:

    devmem2 0x47401c60 b 1
    /dev/mem opened.
    Memory mapped at address 0xb6f38000.
    Value at address 0x47401C60 (0xb6f38c60): 0x80
    Written 0x1; readback 0x1

    Fresh boot with no USB Device on host:

    devmem2 0x47401c60 b 1
    /dev/mem opened.
    Memory mapped at address 0xb6fbb000.
    Value at address 0x47401C60 (0xb6fbbc60): 0x19
    Written 0x1; readback 0x1

    Device Hot Plug:

    devmem2 0x47401c60 b 1
    /dev/mem opened.
    Memory mapped at address 0xb6f9a000.
    Value at address 0x47401C60 (0xb6f9ac60): 0x5D
    Written 0x1; readback 0x1

    I checked the current draw of my device, and it uses approx. 85mA (measured by comparing avg. current draw of beagleboard vs avg. current draw of beagleboard + device at idle)  One would not think this level of current draw would cause any issues, but apparently it does.  I used a scope to see what was going on on the USB power bus.  Looks like the period of the pulsing is about 250KHz -As a side note I found no evidence of any kind of retry... the bus seems to remain dead until power is cycled.

    #1: Init. w/ device plugged in = FAIL

    #2: Init. w/ nothing plugged in = Succeed

    #3 Shot of physically hot-plugging USB device (same timebase)

    I guess I will try the larger capacitor, or possibly an additional capacitor on the USB bus? 

    I am assuming this route would be easier than changing the way it initializes?

  • Nathan Maresch said:
    Output with USB Device Plugged in on Boot:

    devmem2 0x47401c60 b 1
    /dev/mem opened.
    Memory mapped at address 0xb6f38000.
    Value at address 0x47401C60 (0xb6f38c60): 0x80
    Written 0x1; readback 0x1

    Has the device got enumerated or not after this command?

    Nathan Maresch said:
    Fresh boot with no USB Device on host:

    ......

    Device Hot Plug:

    ......

    You don't need to run the devmem2... command since these two cases have no issue.

  • Clicked wrong button (Post instead of Quote) before finished my response...

    Nathan Maresch said:
    I guess I will try the larger capacitor, or possibly an additional capacitor on the USB bus? 

    Yes, you can add another 50uF cap.

  • Well, I don't think increasing the cap will fix the issue.

    Please just answer my prev question (devmem2... with device plugged before power on), then we will try some sw workaround.

  • Oops sorry -I thought you were looking for the register value -no devmem2 just produces another waveform that looks like #1.  I don't know anything about USB enumeration, but from the waveform it looks like the usb bus needs some capacitance(or a much higher frequency), as it is becoming discharged so quickly.  I'll try opening up my device and adding a capacitor to see if that helps -that is probably easier to modify than the beaglebone.

  • Does you device copy the EXACT USB portion schematics of Beaglebone?

    Is your device powered only by USB0 device port?

    If not, you could move the cap C34 on Beaglebone to the VBUS line between the power switch and the USB1 port, and increase it to 150uF, I think this will fix your problem.

  • Yeah the schematic is the same -the app note for the TPS2051 shows capacitors on the output.  I added a 100uf capacitor at my device, and it works now!

  • Glad you got it working.

    I believe the C34 is on the TPS2051 input side is due to other restrictions of the design. But if you device is not powered by USB0 only, you are not restricted as in BBB. So you can add the cap on the output side, but I recommend to increase it to 120uF since this is the minimum required by the USB specs.