4 Replies Latest reply on Nov 16, 2018 4:12 AM by MaWo_1214996

    Check for USB connection in software




      I am sitting on a project based on the AN82072 USB General Data Transfer with Standard HID Drivers.

      I would like to realize that I have a decision wether USB is connected or not and run different code respectively.

      So I would like to detect USB connection in software.

      If USB cable is connected to the host, it should display data in my host application, as it is realized in the AN now.

      If no USB connection is present, I would like to record data to an SD card.


      I have read that I can do this with detecting the BUS Voltage on the USB Component. I probably will realize it that way, but for now I am still sitting with the demo board and it would be convenient to have that in software.


      Anyone can help here?