
4. Clock Sources
A31G22x Clock Setting Guide
20
4.
Set N1 to the value that allows f
VCO
to be less than 200MHz.
f
VCO
= f
IN
* (N1 + 1) = 2MHz * (47 + 1) = 96MHz
5.
Set D to the value that allows f
VCO*2
to be less than 250MHz.
fVCO*2 = f
VCO
* (D + 1) = f
VCO
* (0 + 1) = 96MHz
6.
By adjusting values of N2 and P, set f
PLLOUT
to be 48MHz.
f
PLLOUT
= f
VCO
/ {(N2 + 1) * (P + 1)} = 96MHz / {(1 + 1)*(0 + 1)} = 48MHz
7.
Configure the SCU_PLLCON register:
①
Set BYPASSB bit to enable PLL Output Bypass mode.
②
Set PLLEN and PLLRSTB bits to enable PLL and PLL Reset.
③
Set PREDIV to the value that you defined for the PLL Divider in the
④
(Option) Update the SCU_PLLCON register. After applying stabilization time, check
PLLLOCK bit to confirm whether PLL is locked.
8.
If PLLLOCK bit is set, configure the SCU_SCCR register so that the system main clock
becomes the HSI PLL mode:
①
Set PLLINCLKSEL bit to 0 (0x00).
②
Set MCLKSEL bits to 10 (0x10).
9.
Update each global variable representing HCLK and PCLK to have the system operation
frequency value.