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.

TM4C123x USB Host: USB device connect/disconnect events

Hi,

here the TM4C123x is a USB Host driving the VBUS. When a USB device is connected/disconnected, I would like to know how the TM4C123x detects the connection/disconnection. Is there a register bit that indicates the connect/disconnect status? Or is there an interrupt that indicates the connect or disconnect event?

In other ARM MPU devices, there the USB IP in host mode detects the device insertion by either DP or DM being pulled high by the device. Is that the same here?

In the TIVA library I can see the events

USB_EVENT_CONNECTED

USB_EVENT_DISCONNECTED

and wanted to understand the underlying HW mechanism for these events.

Thanks,

--Gunter

  • Hello Gunter,

    I would suggest using the E2E search to see what other posts have been made on the topic of recognizing connect and disconnect of the USB device.

    Secondly, I would recommend looking at the code/library files to trace what causes the conditions USB_EVENT_CONNECTED or USB_EVENT_DISCONNECTED. This, most likely, will get you the answer you are looking for since the library will read the pins or registers that are used for detection.
  • Hi Chuck,

    from what I can see in the driverlib, there are interrupts going out of the USB IP on connect/disconnect.

    #define USB_INTCTRL_DISCONNECT 0x00000020 // Disconnect Detected
    #define USB_INTCTRL_CONNECT 0x00000010 // Device Connect Detected

    This seems to be in the reserved space of the USBIS register of that USB IP.

    Again please confirm the underlying architecture here how the USB Host IP detects connection/disconnection, and whether those are the USBIS bits that are driving that.


    Regards,
    --Gunter
  • Hello Gunter

    Are you sure you are looking at the "OTG A / Host Mode" description for USBIS?

    Regards
    Amit
  • Hi Amit,

    you are correct, the USBIS OTG A Host Mode register has all necessary bits available and they are not reserved. So we are good for Host mode.

    I will post a separate thread on a separate question on USBIS Device Mode.

    Regards,

    --Gunter