2023-07-13 03:18 AM - edited 2023-07-13 03:20 AM
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.
2023-07-13 12:01 PM
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!
2023-07-13 12:25 PM
First, the value of R39 does not correspond to the USB specification. Second, the F2 series have an integrated pull-up resistor.
2023-07-13 07:48 PM - edited 2023-07-13 08:06 PM
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.
2023-07-13 08:03 PM
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.
2023-07-14 01:28 AM
Perhaps you should increase the heap size
2023-07-14 12:22 PM
@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.
2023-07-18 01:55 AM
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?
2023-07-19 07:39 PM
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.
2023-07-20 03:13 AM - edited 2023-07-20 03:16 AM
> 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