Changing CPU frequency/clock in existing STM32H750 project
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-12 9:02 AM
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:
My new tentative clock config:
Solved! Go to Solution.
- Labels:
-
LCD-LTDC
-
RCC
-
SPI
-
STM32H7 Series
-
TIM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-16 4:35 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-12 9:19 AM
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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-12 9:48 AM
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-12 2:10 PM
> 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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-14 10:31 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-16 4:35 AM
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
