Can't get max frequency out of STM32H7
Hi everyone,
I am having a hard time trying to get the max clock frequency out of the STM32H753ZIT6U.
This is the revision V model and is capable of hitting 480MHz unlike its Y revision.
This is my code to get to 480MHz:
LL_PWR_ConfigSupply(LL_PWR_LDO_SUPPLY);
LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
LL_APB4_GRP1_EnableClock(LL_APB4_GRP1_PERIPH_SYSCFG);
SYSCFG_PWRCR_REG |= (0x01 << 0);
while(LL_PWR_IsActiveFlag_VOS() == 0);
FLASH_ACR_REG &= ~(0x3F << 0);
FLASH_ACR_REG |= (0x3F << 0);
LL_RCC_PLL_SetSource(LL_RCC_PLLSOURCE_HSI);
LL_RCC_PLL1_SetM(4);
LL_RCC_PLL1_SetVCOInputRange(LL_RCC_PLLINPUTRANGE_8_16);
LL_RCC_PLL1_SetVCOOutputRange(LL_RCC_PLLVCORANGE_WIDE);
LL_RCC_PLL1P_Enable();
LL_RCC_PLL1_SetP(1);
LL_RCC_PLL1_SetN(30);
LL_RCC_PLL1_Enable();
while(LL_RCC_PLL1_IsReady() == 0);
LL_RCC_SetSysPrescaler(LL_RCC_SYSCLK_DIV_1);
LL_RCC_SetAHBPrescaler(LL_RCC_AHB_DIV_2);
LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_2);
LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_2);
LL_RCC_SetAPB3Prescaler(LL_RCC_APB3_DIV_2);
LL_RCC_SetAPB4Prescaler(LL_RCC_APB4_DIV_2);
LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL1);After all this its hitting 240MHz proven via the oscillscope and polling a USART Rx that suppose to timeouts on 1 second, but It timesout actually on 2 seconds.
I have no idea whats wrong here as I double checked my numbers for the PLL as it should achieve 480MHz
Using HSI Clock = 64MHz thus,
64MHz / 4 (M) = 16MHz * 30 (N) = 480MHz / 1 (P)
Any ideas?