cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F207VGT6 VCP start fail

SimonLee
Associate II

Hi Mr. and Miss.
At present, I use a circuit board designed by myself, using STM32F207VGT6. Initialize the VCP function using STM32CubeIDE. But there was a phenomenon that it couldn't solve. Error Code10 displayed on Windows.

Attached is my circuit diagram and the settings of CubeIDE(Only initial setting without any code add or modified)

Where would this be causing the problem? Please give me some advice, much thanks.

SimonLee_3-1689243444127.png

SimonLee_4-1689243461469.png

SimonLee_0-1689243578526.png

 

 

SimonLee_2-1689243335525.png

 

 

10 REPLIES 10
Pavel A.
Evangelist III

Hi. Code 10 means that Windows has successfully detected the device. The USB enumeration and all the descriptor reads are done and the device driver has been started. But then the driver saw something that it does not like. it can be additional descriptor, request or data read (or missing) from some endpoint. Happy debugging!

Piranha
Chief II

First, the value of R39 does not correspond to the USB specification. Second, the F2 series have an integrated pull-up resistor.

Hi Pavel A.


Thank you very much for your kind reply. In my design, I am not using ID PIN (It connected to GND) and without the activate VBUS sense, will this cause any problem?

As you say,  the driver saw something that it does not like. it can be additional descriptor, request or data read (or missing) from some endpoint. But I didn't add anything, I only setting the VCP function in CubeIDE and didn't add any code. 


Would you please give some advice? I have remove the R39, but it still can't work.

Hi Piranha
Thanks for your  kindly reply. I have removed the R39, but the phenomenon has not changed.
Are there any other issues that I haven't noticed based on your experience. Please also share your views. Let me have a direction to find the bug.

kosthala
Associate

Perhaps you should increase the heap size

@SimonLee The hardware connections likely are OK because host successfully detects the device and moves quite a lot of data during enumeration. After removal of R39 has anything changed in the behavior?

Advice: get a USB bus analyzer. Find a person who knows how to use it.

 

Hi Pavel A.:

It makes no difference whether I remove R39 or not.

I've solved this problem, but the solution was that I clicked the wrong CLOCK setting when I was too tired. (almost closes eyes). Guess what? After compiling and downloading the firmware, this problem was solved.

I don't know why this would cause this to fail. Have you ever found this problem?

SimonLee_2-1689670525261.png

 

SimonLee
Associate II

Hi all:

I have solved this problem. If you have the same problem, maybe you can refer to it.
Step 1: Refer to the clock settings in my last reply.
Step 2: Update Windows Forms 10 to 11.
Step 3: Install the VCP driver.
Step 4: Enjoy It.

Because the device is always busy in Windows 10, you can't access it if you want to communicate with it using the UART tool.

I think the problem might be caused by low level drivers or windows.
I'm not sure about the root cause. If anyone knows, please share the root cause.

Hope this information helps you.

Pavel A.
Evangelist III

 > I'm not sure about the root cause. If anyone knows, please share the root cause.

It is not a hardware problem, given that enumeration finishes successfully. Then the only cause can be a bug in code (firmware). Studying examples provided by ST and others can help. Also you can look for a consultant familiar with STM32 and USB. A consultant also may advice to use another USB library.

https://www.fiverr.com/categories/programming-tech/electronics-engineering/embedded-systems-iot