Hi,
I can't seem to get an external 12MHz crystal working with the MCUXpresso SDK and its associated GUI tools. I can, however, make it work with the LPCopen driver library, but I'd rather stick with the MCUXpresso SDK since it seems like NXP will be phasing out or stopping support for the LPCopen SDK in the coming months or years (please correct me if I'm wrong) and I really, really don't want to mix two different driver libraries in the same project (everything else is working fine).
I'm ensuring that 'sys_osc' is the input to the SYSPLLCLKSEL mux, but what I'm seeing is that the PLL never locks. Additionally, the system oscillator is NOT bypassed (it is active), since I'm using the recommended crystal attached to both XTALIN and XTALOUT pins with the recommended 27pF bypass caps as well. If I hook up a scope, no activity is present across either side of the crystal.
Anyway, here's the code that is generated by MCUXpresso SDK:
POWER_DisablePD(kPDRUNCFG_PD_IRC_OUT);
POWER_DisablePD(kPDRUNCFG_PD_IRC);
POWER_DisablePD(kPDRUNCFG_PD_SYSOSC);
CLOCK_InitSysOsc(12000000U);
CLOCK_Select(kSYSPLL_From_SysOsc);
clock_sys_pll_t config;
config.src = kCLOCK_SysPllSrcSysosc;
config.targetFreq = 60000000U;
CLOCK_InitSystemPll(&config);
CLOCK_SetMainClkSrc(kCLOCK_MainClkSrcSysPll);
CLOCK_Select(kCLKOUT_From_SysOsc);
CLOCK_UpdateClkOUTsrc();
CLOCK_SetCoreSysClkDiv(2U);
CLOCK_SetClkDivider(kCLOCK_DivUsartClk, 1U);
SYSCON->UARTFRGDIV = 0;
CLOCK_SetUARTFRGMULT(0U);
SystemCoreClock = BOARD_BOOTCLOCKIRC12M_CORE_CLOCK;
Any advice? Thanks for your time.