This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

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

Part Number: LP-AM261

Tool/software:

We have an application running on LP-AM261 in which USB CDC Virtual Com is used.

Before switching from Bootloader to Firmware, we want the USB device to be disconnect/de-enumerated from the host.

How to achieve this?

Please help in solving the above-mentioned issue.

Thanks

Nithin

  • 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