cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMx clock resolver chooses the wrong USB clock frequency

TechGuyMike
Associate III

I'm using CubeIDE 1.15 with CubeMx plugin 6.11 to develop code for STM32H745.

The clock resolve chooses 64MHz for USB:

TechGuyMike_0-1713396257858.png

whereas the correct USB clock frequency is 48MHz:

TechGuyMike_1-1713396408935.png

I would expect the clock configuration GUI to flag this issue for me and set up the correct frequency of 48MHz for USB when running the clock resolver.

 

Just in case this is relevant, this is what my USB setup looks like:

TechGuyMike_2-1713396660001.png

 

4 REPLIES 4
STTwo-32
ST Employee

Hello @TechGuyMike 

I've tried to reproduce that issue but each time the USB Clock is generated correctly:

STTwo32_0-1713424097097.png

STTwo32_0-1713424340905.png

 

 

Can you add more details (are you starting your project from an MCU or a board, what are the Steps to reproduce ,...).

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

FBL
ST Employee

Hello @TechGuyMike 

I confirm CubeMX should not exceed the required value for the controller as detailed in datasheet. Internal PHY clock is running at 48MHz whatever the speed is. An internal ticket 179358 is submitted to dedicated team.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!
Jacob WOODRUFF
ST Employee

Hi All,

 

This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.

 

Regards,

Jake

ST Support

Sure, here's a repro scenario:

Start with STM32CubeIDE 1.15 and CubeMx plugin 6.11.0.

Choose MCU STM32H745IIK6 when creating a new project.

Agree to apply the default configuration of the MPU.

Enable support for HF/LF crystal oscillators and enable USB FS device mode:

TechGuyMike_0-1713474776233.png

TechGuyMike_3-1713475012906.png

 

Enable HSE and set the input frequency to 16 MHz:

TechGuyMike_1-1713474831644.png

 

Choose PLLCLK and set MCU core frequency to 320 MHz:

TechGuyMike_4-1713475112548.png

Once the clock tree is automatically updated, "to USB" frequency is automatically set to 64 MHz:

TechGuyMike_5-1713475157105.png