Hi Robin,
Thank you for your help.
MCG External Reference Clock selection only gave user two options: System Oscillator 0 and RTC clock. Not sure why. Now, i wonder what MCG External reference clock means?
However, searching around the web, i came to know that there is an issue with K60F120 silicon as highlighted by Erich Styger in the link below:
https://mcuoneclipse.com/2013/10/27/usb-with-the-twr-k60f120m-and-twr-k70f120m/
I followed his recommendation and make it passed through the PLL locking while loop.
One note is that the processor expert generates this codes:
/* MCG_C10: LOCRE2=0,??=0,RANGE1=2,HGO1=0,EREFS1=0,??=0,??=0 */
MCG_C10 = MCG_C10_RANGE1(0x02);
/* MCG_C2: LOCRE0=0,??=0,RANGE0=2,HGO0=0,EREFS0=0,LP=0,IRCS=0 */
MCG_C2 = MCG_C2_RANGE0(0x02);
and i have to change to this codes to make it pass the PLL locking step.
/* MCG_C10: LOCRE2=0,??=0,RANGE1=2,HGO1=0,EREFS1=0,??=0,??=0 */
MCG_C10 = (MCG_C10_RANGE1(0x01) | MCG_C10_EREFS1_MASK);
/* MCG_C2: LOCRE0=0,??=0,RANGE0=2,HGO0=0,EREFS0=0,LP=0,IRCS=0 */
MCG_C2 = MCG_C2_RANGE0(0x01);
Note that the " | MCG_C10_EREFS1_MASK" is not generated by processor expert, but that bit-wise "or" is needed otherwise it won't make it through the PLL locking. i need to read user programming reference further to understand this Mask bit a bit more.
i will try to check the PLL output clock correctly generated at 120 Mhz tomorrow by trying to output the clock to one of the pin and observe it on the scope. For now, i can make it through the PLL lock to continue on my evaluation which is good. According to the link above, It seems that the issue does not exist on TWR-K70F120M.
i don't know why, but it seems to be a coincidence that the KDSK does "not" support TWR-K60F120M board but supports TWR-K70F120M board. Maybe Freescale does not want user to continue with TWR-K60F120M anymore? just a wild guess from my part.
cheer,
Henry