AnsweredAssumed Answered

k24 clock configurations for external 16MHz osc and PLL

Question asked by alexbodurka on Feb 27, 2017
Latest reply on Feb 1, 2018 by Ryan Lush



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 */
(MCG_S_IREFST(kMCG_FllSrcExternal) | MCG_S_CLKST(kMCG_ClkOutStatExt)))

Original Attachment has been moved to: