Device Mode Unplug Detection in CY7C67300

Question: The sie1_slave_reset_isr is expected to be called on a device detach but it is called on an attach. What is the recommended method of detecting a detach?



The best way to determine if you are connected to a host is by monitoring VBUS. A host must supply VBUS to your peripheral device. Since you are using SIE1 you can connect VBUS on the connector to the OTGVBUS pin. Then by enabling the VBUS interrupt (Device n Interrupt Enable) you can detect when VBUS changes. Our key example of how this is used is when doing OTG functions like in de1. This example can be located at C:\Cypress\USB\OTG-Host\Source\stand-alone\de1 after you install the CY3663 EZ-OTG(TM)/EZ-Host(TM) development kit tools.