Hi,
I wanted to know what are the correct order of setup to utilize the crystal oscillator and the PLL0 on LPC55S69.
My code looks like this
//Declarations
pll_setup_t pll0_setup;
pll_config_t pll0_config;
pll_error_t pll0_error;
// Init board hardware.
BOARD_InitBootPins();
BOARD_InitBootClocks();
BOARD_InitBootPeripherals();
// Init FSL debug console.
BOARD_InitDebugConsole();
// Setting up the Clock to run from external oscillator and PLL0
CLOCK_AttachClk(kFRO_HF_to_CTIMER0);
CLOCK_AttachClk(kEXT_CLK_to_PLL0);
pll0_config.desiredRate = 96000000;
pll0_config.flags = PLL_CONFIGFLAG_FORCENOFRACT;
pll0_error = CLOCK_SetupPLL0Data(&pll0_config, &pll0_setup);
if (!pll0_error){
while(1);
}
pll0_error = CLOCK_SetupPLL0Prec(&pll0_setup, PLL_SETUPFLAG_WAITLOCK);
if (!pll0_error){
while(1);
}
CLOCK_AttachClk(kPLL0_to_CTIMER0);
CLOCK_AttachClk(kPLL0_to_MAIN_CLK);
PRINTF("Configuring Timer 0...\n");
Is this correct?
Regards,
Safi