Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
In a self powered design you have to monitor the VBus for correct USB behavior: Take a look into the Cypress AN15813 for details. Doing this, you have an information about the cable plugged or not. You can also watch the "SetConfiguration" Command, but this is only called at Plug-In and successfull enumeration by teh host. AFAIK there is no software command after removing the USB cable.