Skip to main content
IP.2
Associate II
November 29, 2024
Solved

Fail to find a clock

  • November 29, 2024
  • 1 reply
  • 639 views

Hello there,

I’m trying to squeeze functionality into an STM32U5 MCU via the STM32CubeMX tool.

After setting the pins, the clock configuration fails to find a solution.

The requirements for the clock are to run from an internal source, as the design is cost-sensitive

and run the system clock as close as possible to the maximum possible clock, which is 160MHz.

I tried a few system clock values, but STM32CubeMX always failed, also, STM32CubeMX does not provide a direction or an alternative solution (e.g. Here is an alternative solution but it runs only at a system clock of  XXX MHz).

I’d like to emphasise that each such clock configuration search is very long (more than an hour on a strong computer), but eventually always fails.

 

What would be the best way to move forward?

Best answer by IP.2

Solved. 

The way it worked for me is by changing the order of the resource allocation process:

1. First, set the clock to your preferred value and lock it to this specific value.

2. Set items that don't have pins flexibility: e.g. USB, JTAG.

3. Add your flexible resources slowly, besides GPIOs, and check that all is still OK after each (PWM, I2C, Analog etc), until the level of code generation, or at least "System View" and "Pinout View" all green.

4. Add your GPIOs.

 

Hope it helps

 

 

 

1 reply

STTwo-32
Technical Moderator
November 29, 2024

Hello @IP.2 could you share your .ioc file and give more description about your issue (with screenshots if possible).

Best Regards.

STTwo-32 

IP.2
IP.2AuthorBest answer
Associate II
December 6, 2024

Solved. 

The way it worked for me is by changing the order of the resource allocation process:

1. First, set the clock to your preferred value and lock it to this specific value.

2. Set items that don't have pins flexibility: e.g. USB, JTAG.

3. Add your flexible resources slowly, besides GPIOs, and check that all is still OK after each (PWM, I2C, Analog etc), until the level of code generation, or at least "System View" and "Pinout View" all green.

4. Add your GPIOs.

 

Hope it helps