2019-07-08 08:24 PM
I want to realize CDC function to transimit/receive data to/from PC via STM32F105RB. I get the code from Cube. Set clock, enable CDC and modify heap size to 0x1000. But when I power on deivce, "Device descriptior request failed" shown.
1.I don't know where is the problem.
2.By the way, For the PC driver, "Starting from windows 10, the STSW-STM32102 driver is no more adequate and the usage of the native inbox driver is recommanded", I don't konw where can get native inbox drive? This is mean I don't need to install driver in WIN10. Now I'm using win10 to do the testing.
3.I also tired WIN7(32bit), still have the "Device descriptior request failed" problem.
Please help me.
Solved! Go to Solution.
2019-07-16 07:15 PM
I confirm the HAL_PCD_IRQHandler, device go to Handle Reset Interrupt->Handle Enumeration done Interrupt->Handle Suspend Interrupt, I don't know why go to Handle Suspend Interrupt finally. Does "Handle Enumeration done Interrut" means enueration ok? If it is OK, it should be see COM port in PC?
2019-07-16 08:08 PM
I had to set it to Crystal, and then I checked the crystal was running on the scope at 8MHz
Then set that in the cube, it works now...
2019-07-16 08:12 PM
So I tried some more debugging. You have the external crystal set to 16 MHz. I didn't notice this and my board has a 8 MHz crystal. Once I changed this, it worked for me.
2019-07-16 11:36 PM
Yes, Our external crystal is 16 MHz, so I set to 16MHZ.
1. So you mean you use my code and modify the code to 8MHZ, it worked fine? If so, we can't use 16MHZ external crystal? It is unbelieve. Because I think finnally to USB clock is 48MHZ.
2.Then Is it because F103 and F105 have the something different?
2019-07-17 12:08 AM
please check your crystal is running with a scope, do you have one ?
please check that inside the cube the crystal is connected to the PLL and running the system clock and the USB port.
I am sure this is the problem, since it half works, just like mine did.
2019-07-17 04:51 AM
Sorry that I don't understand your meaning clearly. I check the HSE and USB D+ frequency. Please have a check.
2019-07-17 05:18 AM
2019-07-17 06:39 AM
I assume 16 MHz external should work, if the rest of the clock setup is ok (the clock setup page should tell you so).
The F103 is different from F105, in that it doesn't have the USB OTG support. So there were some slight differences in the generated code, but I'm assuming you haven't touched the generated code, so should be fine for F105.
I just got some F303 boards which should support OTG, I'll try again with one of those.
2019-07-17 05:21 PM
Attach are my clock setting.
2019-07-17 05:23 PM
Please see my attach file.