cancel
Showing results for 
Search instead for 
Did you mean: 

USBD_CDC Not working at windows 10

FDigi
Associate III

Hi everyone !!

I am using a virtual com port (VCP) to conect my device to the computer. Everything was running well till i decide to comunicate with a windowns 10 host.

I realized two diferent situations :

The first was when i started the device with a terminal like Tera Therm (The equipment runned normally)

The second situation (the problematic one) was when i decided just to use the usb source and don't open a terminal. At this case, the equipament got stuck already in the first CDC_Trasmit_FS function, so i realized that seems the device is a status of "conected with host, and waiting for this".

0693W000008wWLYQA2.jpgHow the image above shows, i realized that variable dev.state assumes the value = 0x03 even not connect to a terminal, diferent of w8 or older versions.

Trying to solve this problem, i decided to force the signal of tx.state to zero after a transmition to avoid the problem of stuck, i also tryed a time out, but all this ones are just paleative solutions...

I hope i have been clear in my explanation !!

Daniel

3 REPLIES 3
Imen.D
ST Employee

Hello @FDigi​ ,

It may be the issue related to the same case of this article: USB device not recognized.

Check this article, then please keep us informed about your update.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

I also confirm this issue, I have been trying to set up communication between a board and the PC (testing on linux, windows 10 and mac), with no luck the usb is always returned as busy. This has been really frustrating as even the CDC standalone example will not work for me. The boards tested were nucleo 432KC and WB55.

FDigi
Associate III

Hello @Imen DAHMEN​ 

Just updating my debug status....

tryied following your sugestion but the issue persisted, so o checked some USB status and prevented that my USB starts transmitting just connected physically

to the PC. I used the solution above:

   if ((hUsbDevice_0->dev_state != USBD_STATE_CONFIGURED)

            || (hUsbDevice_0->ep0_state == USBD_EP0_STATUS_IN))

    {

        // The physical connection fails.

        // Or: The phycical connection is open, but no VCP link up.

        result = USBD_FAIL;

    }

Whit an open terminal (in my case, the Tera Term) i realized that it started send messages, however, in a few minutes it stops by itself and

the function USBD_CDC_TransmitPacket just return "Busy" status and keeps in a infinity loops.

Any solution or suggestions for this ??

Thank you so much for your atemption !!