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.

missing USB_handleVbusOffEvent

I'm using the TI USB HID driver.  Occasionally we are seeing that USB_handleVbusOffEvent is not called when the device is unplugged.  It may be happening when the connector is wiggled so that the pins make quick intermittent contact and/or disconnect/connect in a different order than normal.  Has anyone else seen this?  Any idea why this might be happening?

  • Did you attach a capacitor to the VBUS (5V) pin of the USB connector?

    Plug-in/off of USB connector causes switch bounce, like other mechanical switches. Usually, USB power domain of MSP430 is powered from VBUS pin. To stabilize this supply, around 10uF capacitor is connected to the VBUS pin. This capacitor reduces the bounce of VBUS voltage.

    Even for self-powered configuration, a capacitor is required to stabilize VBUS sensing. USB spec (Device Capacitance ECN) specify at least 1uF capacitor, for OTG ADP (Attach Detection Protocol).

    Tsuneo

  • For now I have put in a workaround that uses (USB_connectionInfo() & kUSB_vbusPresent) to determine if USB power not present, but the device has not received a USB_handleVbusOffEvent notification.

    So it appears that USB_connectionInfo is always correct, but sometimes the USB_handleVbusOffEvent is not sent.

    The device is self powered via a battery and there is a 4.7uF capacitor on the VBUS line.  Is a larger (10uF or more) capacitor required?

**Attention** This is a public forum