+ Reply to Thread
Results 1 to 3 of 3

Thread: USB disconnection detection

  1. #1
    Beginner Beginner rum will become famous soon enough
    Join Date
    Jul 2014

    USB disconnection detection


    In xmc4400 manual is written that in DEVICE mode when VBUS is switched off (connector unplugged) OTG interrupt is triggered (bit 2 gintsts). I do not get this interrupt even if it is properly enabled.

    1. Does this behavior depend on pin P0.9 status ID connection? Because in my case it is pull up to 3.3.

    2. I am using USBD app witch is correctly working, how to detect USB disconnection without using P0.9 ID pin?

    3. Suggestion to use usbreset interrupt suggested on this forum is also not triggered when disconnected.


  2. #2
    Daryl Neo

    Q1) This pin (P0.9) should not be pull-up. The OTG ID pin is used only for the USB dual role device; where in it should support device mode and host mode functionality depending on the ID pin.
    Please note that currently our XMC_LIB for USB only supports USB device functionality and doesn’t support OTG functionality.

    Q2) You will need to add an event callback for USB disconnect event. (Example attached)
    With this, whenever then user unplug the USB cable, the disconnect event will be entered.

    Q3) In a self-powered USB device, the reset event can be used to support device functionality for disconnect-connect back, which is basically a re-initialization of the USB.


  3. #3
    New Member New Member digitron is on a distinguished road
    Join Date
    Sep 2015
    Hi Daryl !
    My Software also freezes, if you unplug the usb connector.
    I've downloaded your example, but i can't find any event callback for USB disconnect event.
    Where is it?

+ Reply to Thread

Tags for this Thread


All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.

Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.