Question
In STM32F091RBT6, 8MHz clock is not getting configured to 48MHz
I am using STM32F091RBT6, in which I have 8Mhz internal clock and I have to configured it to the 48Mhz. I have selected PLL as a System clock source but its not getting configured to 48MHz. As I have debugged it, its getting configured to only up to 44MHz. If I try to configure it to 48MHz, code gets stuck.
Below is my configuration.
void fnSystemClockInit(void)
{
RCC_ClocksTypeDef pointer;
RCC_PCLKConfig(RCC_HCLK_Div1); // PCLK prescaler
RCC_HCLKConfig(RCC_SYSCLK_Div1); // HCLK prescaler
RCC_DeInit(); // Internal 8 Mhz clock
RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK); // Set PLL as system clock
RCC_ITConfig(RCC_IT_PLLRDY, ENABLE); // Enable PLL flag
RCC_PLLConfig(RCC_PLLSource_HSI_Div2, RCC_CFGR_PLLMUL11); // Config PLL params
RCC_PLLCmd(ENABLE); // Enable PLL
while ((RCC_GetFlagStatus(RCC_FLAG_PLLRDY)) != SET) ; // wait while PLL is stable
RCC_ClearITPendingBit(RCC_IT_PLLRDY); // Clear the PLL flag
SystemCoreClockUpdate(); //update core clock freq
RCC_GetSYSCLKSource(); // Get the system clock source
RCC_GetClocksFreq(&pointer); // Get all the Clock frequencies
}Can anybody help me to get out of this?
Thanks in advance...!