- Check for the CRYSTAL present
status from TOP_RCM.CLK_LOSS_STATUS.CRYSTAL_CLOCK_LOSS register in TOP_RCM
before proceeding further in configuring the PLL
- If the CRYSTAL is not present
then abort the PLL lock procedure and continue with RC_CLK for boot
- Program the N divider of the
PLL with the calculated value of 0x9 in register field in order to
get REF_CLK suitable for PLL locking, TOP_RCM.PLL_CORE_M2NDIV.N =
0x09
- Program the M2 divider with the
value of 0x1 in the register field to get the desired frequency after PLL
locking, TOP_RCM.PLL_CORE_M2NDIV.M2 = 0x1
- Update the M divider setting of
the PLL with the value which is derived from the above formula,
TOP_RCM.PLL_CORE_MN2DIV.M = 0x360
- Update the SELFREQDCO value based
on the frequency of CLKDCOLDO
- TOP_RCM.PLL_CORE_CLKCTRL.SELFREQDCO = 010b, if DCOCLK range is from 500
MHz to 1000MHz
- TOP_RCM.PLL_CORE_CLKCTRL.SELFREQDCO = 100b, if DCOCLK range is from
1000MHz to 2000MHz
- Program the SD divider of the PLL
with the value of 0x8 to get the optimum jitter performance,
TOP_RCM.PLL_CORE_FRACDIV.REGSD = 0x8
- Clear the IDLE bit from
PLL_CORE_CLKCTRL register to make the PLL active for locking,
TOP_RCM.PLL_CORE_CLKCTRL.IDLE= 0x0
- Assert the TENABLE signal to make
the M, N, SD divider and SELFREQDCO settings to get loaded into the PLL
for locking, TOP_RCM.PLL_CORE_TENABLE.TENABLE = 0x1
- Assert the TINTZ signal of the
PLL to make the PLL out of SOFT reset,
TOP_RCM.PLL_CORE_CLKCTRL.TINTZ = 0x1
- De-assert the TENABLE signal by
clearing the register with the value of 0x0, TOP_RCM.PLL_CORE_TENABLE.TENABLE =
0x0
- Assert and de-assert the
TENABLEDIV signal of the PLL by setting and clearing its corresponding
register field,
TOP_RCM.PLL_CORE_TENABLEDIV.TENABLEDIV = 0x1
TOP_RCM.PLL_CORE_TENABLEDIV.TENABLEDIV = 0x0
- Wait for the PLL to lock
by polling the PHASELOCK bit to go high in the status register,
TOP_RCM.PLL_CORE_STATUS.PHASELOCK = 0x1
- Program the divider settings of
the various PLL CORE HSDIVDER CLKOUT in their corresponding register field
depending on the required output frequency,
TOP_RCM.PLL_CORE_HSDIVIDER_CLKOUT0.DIV = 0x04 (i.e. 400MHz)
TOP_RCM.PLL_CORE_HSDIVIDER_CLKOUT1.DIV = 0x03 (i.e. 500MHz)
TOP_RCM.PLL_CORE_HSDIVIDER_CLKOUT2.DIV = 0x04 (i.e. 400MHz)
- Assert and de-assert the
TENABLEDIV signal of the PLL CORE HSDIVER by setting and clearing the
corresponding register field,
TOP_RCM.PLL_CORE_HSDIVIDER.TENABLEDIV = 0x1
TOP_RCM.PLL_CORE_HSDIVIDER.TENABLEDIV = 0x0
- Un-gate the clocks from all
CLKOUT of PLL CORE HSDIVDER with the following configuration,
TOP_RCM.PLL_CORE_HSDIVIDER_CLKOUT0.GATE_CTRL = 0x1
TOP_RCM.PLL_CORE_HSDIVIDER_CLKOUT1.GATE_CTRL = 0x1
TOP_RCM.PLL_CORE_HSDIVIDER_CLKOUT2.GATE_CTRL = 0x1
Note: Note that
PLL_CORE_HSDIVIDER.TENABLEDIV and PLL_CORE_TENABLE.TENABLE reference TENABLE
fields in different registers. Make sure to address the correct registers when
loading the M, N, SD dividers and SELFREQDCO settings and also when loading the
HSDIVIDER values.