Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 229128

Forum Post: RE: LP-AM261: How to disconnect/de-enumerate the USB CDC device

$
0
0
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

Viewing all articles
Browse latest Browse all 229128

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>