cancel
Showing results for 
Search instead for 
Did you mean: 

Changing CPU frequency/clock in existing STM32H750 project

Hueli.1
Associate III

I am working on an existing project based on the STM32H750 where I want to stop overheating by reducing the CPU frequency.

Currently I use 400MHz and I want to lower it to 200MHz. I have peripherals (LCD and SPI flash) as well as timers (TIM1,2,5) that are affected by this change.

My question is which adaptions to the Timers and possibly the initialization of LCD, ext. flash I have to make when changing the CPU frequency? Is there a lower limit for the LCD bus frequency for example?

For the timers I adapted the prescalers but that doesn't do the job yet. (black LCD screen and crash)

My old clock config:

0693W00000QNasiQAD.png 

My new tentative clock config:

0693W00000QNasEQAT.png 

1 ACCEPTED SOLUTION

Accepted Solutions
Hueli.1
Associate III

I got it working by respecting the following:

  • When using the automatic prescaler determination by CubeMX various other freqeuncies for PLL1,2,3 get changed leading to SPI, I2C and other peripherals not working anymore.
  • Best way was to just tweak a single prescaler that sets the SYSCLK to 200MHz and adapt the rest to that the peripheral clocks stay the same.
  • Important was also to *not* use PWR_REGULATOR_VOLTAGE_SCALE3 automatically set by CubeMX and instead use PWR_REGULATOR_VOLTAGE_SCALE2 or 1

View solution in original post

5 REPLIES 5

Several of the peripherals have potential "clock inversion" issues.

USB, SDMMC, LTDC, for example

There are usually rules / expectations in the RM, but you have to read that rather than click buttons.

Why can't you simply drop the CPU/SYSCLK to 200 MHz, and leave the AHB and down stream APB's as they are?

How hot is the part getting?

What are you doing that seems to be a specific cause of this heating?

Instead to doing this via the GUI, perhaps go in a more selectively alter specific clock chains to identify which is the most problematic? Bisection?

TIM frequencies are a function of their Prescaler and Period settings, the least disruptive to change is the Prescaler as it doesn't alter the granularity of the counting element. Remember both these are programmed with N-1 values.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Hueli.1
Associate III

Several of the peripherals have potential "clock inversion" issues.

USB, SDMMC, LTDC, for example

There are usually rules / expectations in the RM, but you have to read that rather than click buttons.

>>> I am going to check the RMs

Why can't you simply drop the CPU/SYSCLK to 200 MHz, and leave the AHB and down stream APB's as they are?

>>> As stated in this file (here ) The maximum bus matrix frequency is half the maximum CPU frequency, I had it at 200MHz so now with 200MHz I am unable to keep it this high (also indicated by CubeMX).

How hot is the part getting?

What are you doing that seems to be a specific cause of this heating?

>>> MCU is getting 70-80 degrees running at 400MHz without any animations on the LCD. Possible reason is the LCD and external flash communication...

TIM frequencies are a function of their Prescaler and Period settings, the least disruptive to change is the Prescaler as it doesn't alter the granularity of the counting element. Remember both these are programmed with N-1 values.

>>> That is what I did.

Does RTC also have to be reconfigured? (async/sync predivider value)

Piranha
Chief II

> The maximum bus matrix frequency is half the maximum CPU frequency

Read it carefully - it tells only about the relation of both maximum frequencies. It doesn't require the ratio to always be 1:2.

> MCU is getting 70-80 degrees

In international forum one should also tell the units...

Hueli.1
Associate III

Read it carefully - it tells only about the relation of both maximum frequencies. It doesn't require the ratio to always be 1:2.

>>> Ok. I found out that what happens is that when changing sysclk to 200MHz, the voltage range changes to 3. This implies a max frequency for AHB1,2 of 100MHz which means I have to reduce it.

In international forum one should also tell the units...

>>> MCU temp. is 70-80 degrees Celcius. Is there another option to

Hueli.1
Associate III

I got it working by respecting the following:

  • When using the automatic prescaler determination by CubeMX various other freqeuncies for PLL1,2,3 get changed leading to SPI, I2C and other peripherals not working anymore.
  • Best way was to just tweak a single prescaler that sets the SYSCLK to 200MHz and adapt the rest to that the peripheral clocks stay the same.
  • Important was also to *not* use PWR_REGULATOR_VOLTAGE_SCALE3 automatically set by CubeMX and instead use PWR_REGULATOR_VOLTAGE_SCALE2 or 1