cancel
Showing results for 
Search instead for 
Did you mean: 

CDC Device descriptior request failed

Treacy Yao
Associate II

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.

27 REPLIES 27

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?

Trevor Jones
Senior

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...

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.

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?

T J
Lead

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.

Sorry that I don't understand your meaning clearly. I check the HSE and USB D+ frequency. Please have a check.0690X000009Ypn0QAC.jpg0690X000009YpmqQAC.jpg

very difficult to see the voltage of the crystal, and the frequency is not exactly 16MHz ? it should be 16.00 I would expect.
now check in the cube, is the HSE selected as the clock source ?
check it all the way to the usb clock 48MHz inside the cube clock configuration page.

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.

0690X000009Yr78QAC.jpgAttach are my clock setting.0690X000009Yr6yQAC.jpg

Please see my attach file.0690X000009Yr6yQAC.jpg0690X000009Yr78QAC.jpg