cancel
Showing results for 
Search instead for 
Did you mean: 

Having trouble getting USB3300 to work with STM32F407

KK.2
Associate III

Hello there,

I've prototyped a custom PCB, but I'm having issues getting USB to work, Windows is unable to read the Device Descriptor.

The IO, from what I understand, is connected correctly and the generated code is (seemingly) successfully able to initialize the PHY, and the PC will only detect it as plugged in once the `USBD_Start` method within `MX_USB_DEVICE_Init` was executed thats generated by CubeMX.

Apart from having configured the Clocks and USB HS / Device (Com port example) it is a blank project

As the 3300 needs a 24MHz clock I've decided to configure it as shown here by using MCO2. My clock configuration looks like this: https://i.imgur.com/lAhx1jD.png

I've tried to simplify it by setting PLLI2S to x120 / 5 and thus have the MCO2 be /1 with no difference.

I've tried to switch to Full Speed over High Speed with no difference.

Any help would be appreciated, thank you.

21 REPLIES 21
What doc says it should be 24 or 26 MHz? That is news to me. Can you cite it more specifically?
If you feel a post has answered your question, please click "Accept as Solution".
KK.2
Associate III

My configuration is equal to the one from the page 173 here where it says 24 or 26 MHz

Broken link for me.
If you feel a post has answered your question, please click "Accept as Solution".
KK.2
Associate III

Try this: https://www.st.com/resource/en/datasheet/stm32f407vg.pdf

Here it is Page 188. Looking at it again now it makes even more sense since in the diagram the output clock does not go trough the PLL but instead outputs the input clock.

Fixed link:

https://datasheet.lcsc.com/szlcsc/STMicroelectronics-STM32F407VGT6_C12345.pdf

I think you're misinterpreting what it's saying. That is only an example configuration.

0693W000003P0MJQA0.png

If you feel a post has answered your question, please click "Accept as Solution".

The source clock for MCO2 can be selected. You can use the system clock:

0693W000003P0UXQA0.png

If you feel a post has answered your question, please click "Accept as Solution".
KK.2
Associate III

Yes it is an example configuration which I decided to use, because on JLCPCB, a 24MHz crystal is an Extended part, thus has a 3$ upmark over a 25MHz one, which is a basic part, so I used a 25MHz one driving the STM and output a 24MHz clock trough the PLL to see if it is a feasible solution. Worst case I'd have to do what I have to do now, which is switching it out for a 24MHz one.

It would be possible to only have a crystal on the USB PHY directly and no HSE on the STM itself, which is what they mean when saying its not necessary to drive the STM with an external crystal since the PHY will output a clock to the STM for communication with it, but at clean 24MHz input into the PHY is required so that the communication does not corrupt on the USB end.

KK.2
Associate III

How would using the system clock help me? It would still be going trough the PLL, just like the clock configuration in the entry post, and I'd need to run the MCU at a lower speed. I've tried it regardless with the same result. 0693W000003P2YMQA0.png

TDK
Guru

> How would using the system clock help me?

I don't think I've implied that it would. I'm suggesting that the errors in your program are not due to the PLL and are from something else. You're free to have you own opinions. Best of luck.

If you feel a post has answered your question, please click "Accept as Solution".
KK.2
Associate III

I was just curious, maybe you knew something that I didnt. Thank you regardless. I'll pursue trying to solder on a 24MHz crystal as I honestly dont have any better idea for something that I could try out.