cancel
Showing results for 
Search instead for 
Did you mean: 

CDC function added but no any com port shown

Treacy Yao
Associate II

I want to add CDC function. I use the STM32F103RB NUCLEO to add this function. But when I running my application, and insert USB to PC, no COM port shown in PC. I generate the code from cube and I don't know where is the problem. I test WIN10 and WIN7 PC, both are no any port. I have install the related driver in win70690X000009Z0poQAC.png0690X000009Z0peQAC.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
GSome
Associate III

I cant figure how to add 2 picures at once so I did separate post

View solution in original post

14 REPLIES 14
Uwe Bonnes
Principal II

Do you have the pullyp on DP?

What's pullyp on DP? I don't understand

T J
Lead

Just some wires though several connections will not work.

USB is running at 12MHz, you need to use a proper cable, not just several wires that you find around on the bench.

To have half a chance, get a USB cable and cut the end off, then remove the Pin headers and solder the ends directly on the pcb.

CDC works very well if you run the properly routed differential traces on the PCB connected directly to your PCB mounted USB connector.

Actually, I have never tried to use a $10 nucleo board like you have, so I don't know if it can work that way.

You can get your own boards manufactured in China at low cost, then it will work.

Are you aware that there are other nucleo boards that have a usb connector, connected to the processor,?

if you try these boards the Cube CDC function will work without modification for enumeration.

I add some code to make the CDC DMA work correctly, this is your work.

I don't use any pullups on either wire...

Your problem is still the cable.

I suggest you make your own board, it is likely to work first time if you use a proper USB cable.

GSome
Associate III

I use a small adaptor to connect to my nucleo303 board with jumper wires and it works ok.

If you look up user manual UM1974 for nucleo 144 pin boards on page 77 you will see how they connect to an onboard connector.

You will see a connection to a 1.5k resistor to pin G6, this is a pullup resistor to tell pc a cdc device is connected.

I use pin B8 on mine as there is no pin G6

I found connecting 1.5k resistor direct to 3.3 volts caused problems on trying to connect to pc.

I don't use the ESDA6V1BC6 protection diodes but I do add 22 ohm resistors inline with USB_DM and USB_DP

GSome
Associate III

I cant figure how to add 2 picures at once so I did separate post

T J
Lead

I am surprised that works..

good work @GSome​ 

  1. I'm confused. So need I add 1.5K register to D+?
  2. I don't think my USB cable have the problem? It works fine in other device. Which USB cable should I use? Any suggestion? Because I only get Nucleo board, no any other board or lines.

I add 1.5K register and PC have something show and "device descriptor request failed" happen.

0690X000009Z2AyQAK.png

I add 1.5K register and PC have something show and "device descriptor request failed" happen0690X000009Z2AyQAK.png