Hi Nithin, To disconnect based on specific event, you can call the following APIs dcd_int_disable(0); /* TUSB RHPORT = 0 */ USB_deinit(); I tried the following tests and it worked for me: 1. Use the standard SDK CDC Echo example 2. In the echo function, modify and add a condition to de-enumerate if character 'x' is entered in cdc console. 3. if 'x' is detected, call the above 2 APIs, I was able to disconnect. 4. To re-connect after switching back, make sure you enable the interrupt again and re-enumerate properly (see any out-of-box USB application sequence for enumeration) Regards, Shaunak
↧