STM32F765VGT6 with 216MHz CPU clock frequency
I designed a circuit board with the STM32f765vgt6 chip following ST's hardware recommendations (two 2.2uF ceramic capacitors with low ESR connected to Vcap1, Vcap2).
I'm having the following issues: When I initialize the CPU clock frequency to 216MHz, there's a chance that the MCU initialization of the clock fails (the program is stuck at the SystemClock_Config()). If the clock initialization is successful, the main program runs for a while then runs into hardfault. However, with the same program, when I initialize the CPU frequency to 180MHz, everything works normally. All the clock initialization code were generated by using STM32CubeMX Ver6.10.0.
Is the STM32f765vgt6 chip supposed to operate well at 216MHz or did I make a mistake somewhere? When I measure the waveform on the VCAP pin of the MCU, as shown in the picture. Is there anything unusual about that waveform?
My clock initialization code:
void SystemClock_Config(void)
{
LL_FLASH_SetLatency(LL_FLASH_LATENCY_7);
while(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_7)
{
}
LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE1);
LL_PWR_EnableOverDriveMode();
LL_RCC_HSI_SetCalibTrimming(16);
LL_RCC_HSI_Enable();
/* Wait till HSI is ready */
while(LL_RCC_HSI_IsReady() != 1)
{
}
LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_HSI, LL_RCC_PLLM_DIV_8, 216, LL_RCC_PLLP_DIV_2);
LL_RCC_PLL_Enable();
/* Wait till PLL is ready */
while(LL_RCC_PLL_IsReady() != 1)
{
}
while (LL_PWR_IsActiveFlag_VOS() == 0)
{
}
LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_1);
LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_4);
LL_RCC_SetAPB2Prescaler(LL_RCC_APB2_DIV_2);
LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL);
/* Wait till System clock is ready */
while(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)
{
}
LL_SetSystemCoreClock(216000000);
/* Update the time base */
if (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)
{
Error_Handler();
}
}
