Hi,
I am trying to select external oscillator (12MHz) as MCGOUTCLK but the status bit in MCG_S showing selection of external clock does not set.
I have enabled clock for PORTA, OSCSEL is 0 to select OSC0. RANGE is selected as 1 and CLKS as 2.
After that IREFST bit in MCG_S is not cleared and also CLKST bits remain to show internal clock selection.
I have consulted source code for hexiwear firmware and bootloader. I cannot find any other settings.
Any help would be appreciated.
Hi,
I use the CodeWarrior IDE software embedded [Processor Expert] tool generated the MCG initialization code for your reference (using external 12MHz crystal and MCG working at PEE mode with core clock 120MHz & bus clock 60MHz):
More detailed info, please refer attached <CPU_Init.c> & <CPU_Config.h> files.
Thank you for the attention.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------