Need help setting up MCG on K60 With Ext Osc1

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Need help setting up MCG on K60 With Ext Osc1

Jump to solution
1,211 Views
akashdeshmukh
Contributor I


I am using MK60FN1M0VLQ12 processor. Earlier I have connected 8 MHz crystal to EXTAL0/XTAL0 (Ext Osc 0). I have successfully run K60 at 120 MHz.

The program is attached in ExtOsc0.c

The Clock_Init() initializes K60 clock. The pll_init() function initializes MCG and PLL.

 

Now due to some modification in circuit , I want to run a K60 at 120 MHz using a 8 MHz crystal connected to EXTAL1/XTAL1(Ext Osc 1).

Nothing connected to Ext Osc 0.But I am not able to initialize the MCG. The program is attached in ExtOsc1.c


I am not working in Code-warrior platform.

 

Thank you in advance.

 

Please advise.

 

Original Attachment has been moved to: ExtOsc0.c.zip

Original Attachment has been moved to: ExtOsc1.c.zip

Labels (1)
0 Kudos
1 Solution
515 Views
DavidS
NXP Employee
NXP Employee

Hi Akash,

Using OSC1 only is not as straightforward as moving the crystal.

A second oscillator has also been added (OSC1). OSC1 can be used as the reference clock source for one or both of the

PLLs, but there are some restrictions on its use. The following items should be taken into account if you are considering

using OSC1 as the main clock input on your board:

• Either OSC0 or OSC1 can be used as the reference clock source for the PLL being used as MCGCLKOUT.

• Only OSC0 or the RTC OSC can be used as the FLL reference clock so one of those clock sources MUST be available

to the MCG if using FEE, FBE, or BLPE clock modes or when transitioning from the reset default FEI mode to PBE

mode (or any “external” clocked MCG mode). You must transition through FBE mode to enter PEE mode and use the

PLL as the MCGCLKOUT source.

• If OSC1 is to be used it must be configured in MCG_C10 and enabled in OSC1_CR.

• If OSC1 is the only external clock source then the only MCG clock modes available are FEI, FBI and BLPI.

Regards,

David

View solution in original post

0 Kudos
1 Reply
516 Views
DavidS
NXP Employee
NXP Employee

Hi Akash,

Using OSC1 only is not as straightforward as moving the crystal.

A second oscillator has also been added (OSC1). OSC1 can be used as the reference clock source for one or both of the

PLLs, but there are some restrictions on its use. The following items should be taken into account if you are considering

using OSC1 as the main clock input on your board:

• Either OSC0 or OSC1 can be used as the reference clock source for the PLL being used as MCGCLKOUT.

• Only OSC0 or the RTC OSC can be used as the FLL reference clock so one of those clock sources MUST be available

to the MCG if using FEE, FBE, or BLPE clock modes or when transitioning from the reset default FEI mode to PBE

mode (or any “external” clocked MCG mode). You must transition through FBE mode to enter PEE mode and use the

PLL as the MCGCLKOUT source.

• If OSC1 is to be used it must be configured in MCG_C10 and enabled in OSC1_CR.

• If OSC1 is the only external clock source then the only MCG clock modes available are FEI, FBI and BLPI.

Regards,

David

0 Kudos