I'm trying to get a custom board with a MK24FN1M0VLL12 with an external 16MHz oscillator. I'd like to use PLL and 120MHz system clock. I've tried using the KDS2.x new project wizard to start the project and then just dropped in my clock_config files from the MCUXpresso online tool. When trying to setup the clock's I keep getting stuck in a while loop in the function CLOCK_SetPbeMode(). It appears the clock status bit are not set correctly. I did notice that the MCG_C1 and MCG_C2 register values that are outputted from the online tool do not match what's in the registers when debugging.
Anyone know how to properly configure the clocks using an external 16MHz oscillator?
--------- While loop where i'm getting stuck is in fsl_clock.c/CLOCK_SetPbeMode() ---------
/* Wait for CLKST clock status bits to show clock source is ext ref clk */
while ((MCG->S & (MCG_S_IREFST_MASK | MCG_S_CLKST_MASK)) !=
(MCG_S_IREFST(kMCG_FllSrcExternal) | MCG_S_CLKST(kMCG_ClkOutStatExt)))
Original Attachment has been moved to: k24TestProject.zip