2024-10-22 02:15 AM - last edited on 2024-10-22 02:40 AM by Sarra.S
I am just switching clock source to MCU in RCC_CR register by making HSEON bit of above register high and waiting till HSERDY but turnsup.
But thing after HSERDY turns up when I read rcc_cr register both HSEON,HSION bit of RCC cr are at logic 1.
Then how controller will read this means MCU will consider which one as source?.if my understanding is wrong,please provide code block to switch the clock source from HSI to HSE
2024-10-22 02:49 AM - edited 2024-10-22 02:50 AM
Hello @Alex_reynold,
You can select the source by switching the system to HSE using SW bit in RCC_CFGR register as follows:
Ideally, set SW to 10, so PLL is selected as a system clock and select HSE oscillator as PLLSRC in RCC_PLLCFGR register:
Hope that's clear now!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-10-23 05:26 AM
Hi,
I tried to switch source of system clk between hsi,hse.its working properly.but this will give standard clock of 16Mhz and 8Mhz respectively.but when I try to switch pllp as system clock it is not working.
Requirement how can I configure system clock to 48MHz using pll.currently I am not modifying RCC_PLLCFGR(RESET VALUE 0x24003010).As per this,PLLM 16 ,PLLN 192,PLLP 2.SO PLLCLK SHOULD BE 48Mhz.but not getting it.note that PLLSRC is set to 1 soe freq input to pllsrc is Hse I.E HSE clock
2024-10-25 03:36 AM
Hello @Alex_reynold,
I didn't fully understand your issue using PLL, could explain clearly what frequency you want to get
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.