cancel
Showing results for 
Search instead for 
Did you mean: 

How to run STM32H735 CPU in maximum frequency

Roy_Huang
Associate

I am trying to run STM32H735 in 550 MHz, i had read the reference manual so write the following code.

FLASH_OPTKEYR = 0x08192A3B;
FLASH_OPTKEYR = 0x4C5D6E7F;
if (SYSTICK_FREQ > 450 * 1e6 && !(FLASH_OPTSR2_CUR &= FLASH_OPTSR2_CPUFREQ_BOOST)) {
    FLASH_OPTSR2_PRG |= FLASH_OPTSR2_CPUFREQ_BOOST;
} else if (SYSTICK_FREQ <= 450 * 1e6 && (FLASH_OPTSR2_CUR &= FLASH_OPTSR2_CPUFREQ_BOOST)) {
   FLASH_OPTSR2_PRG &= ~FLASH_OPTSR2_CPUFREQ_BOOST;
}
while (FLASH_SR &= FLASH_SR_BSY)
FLASH_OPTCR |= FLASH_OPTCR_OPTSTRT;
while (FLASH_SR &= FLASH_SR_BSY)
FLASH_OPTCR |= FLASH_OPTCR_OPTLOCK;

And print the log output to monitor the register status

LOGF("SYSCFG - CPU_BOOST : %d, FLASH - CPU_BOOST : %d\n", SYSCFG_UR(18) & 1, FLASH_OPTSR2_CUR);

Here is the result
SYSCFG - CPU_BOOST : 0, FLASH - CPU_BOOST : 4

I expected that SYSCFG18::CPU_FREQ_BOOST should be set to 1, but it not.
Is there any process wrong or less for enable CPU_FREQ_BOOST bit?

1 REPLY 1
Roy_Huang
Associate

Problem solve,

After enable RCC_SYSCFG, CPU_FREQ_BOOST turns to 1.
SYSCFG - CPU_BOOST : 1, FLASH - CPU_BOOST : 4