I want to change the frequency of PLL1

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

I want to change the frequency of PLL1

Jump to solution
1,935 Views
DELPHI_Eric
Contributor III

I want to change the frequency of PLL1,

#ifdef XOSC40MHZ

    #ifdef PLL0_160MHZ

    /* Setup PLL0 - 160MHz @ 40MHz XOSC */

    PLLDIG.PLL0DV.R = 0x20041010UL; /* RFDPHI1 = 4, RFDPHI = 4, PREDIV = 1,

                                       MFD = 16, fVCO = 640MHz*/

    #endif

#endif

#ifdef XOSC40MHZ

    #ifdef PLL1_200MHZ

    /* Setup PLL1 - 200MHz @ 40MHz XOSC */

    PLLDIG.PLL1DV.R = 0x00020004UL; /* RFDPHI = 2 (divider=4), MFD = 20,

                                       fVCO = 800MHz 200MHZ(0x00020014UL)160MHZ(0x00020004UL)*/

when PLLDIG.PLL1DV.R = 0x00020004UL;can not debug at while(MC_ME.GS.B.S_MTRANS == 1);                     
but when PLLDIG.PLL1DV.R = 0x00020014UL;can through while(MC_ME.GS.B.S_MTRANS == 1); 

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

Labels (1)
1 Solution
1,430 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

I have already answered this question in the following thread:

https://community.nxp.com/thread/436645 

Regards,

Martin

View solution in original post

0 Kudos
9 Replies
1,430 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

to set the frequency of PLL1 to 200MHz, please use this code:

// Set PLL1 to 200 MHz with 40MHz XOSC reference

      PLLDIG.PLL1DV.R = 0x00020014;      // MFD = 20, RFDPHI = 2

   

      // Mode Transition to enter RUN0 mode:

      MC_ME.MCTL.R = 0x40005AF0;     // Enter RUN0 Mode & Key

      MC_ME.MCTL.R = 0x4000A50F;     // Enter RUN0 Mode & Inverted Key

      while (MC_ME.GS.B.S_MTRANS) {};     // Wait for mode transition to complete

      while(MC_ME.GS.B.S_CURRENT_MODE != 4) {};     // Verify RUN0 is the current mode

Of course, you can use mode transition to another mode. It does not have to be RUN0. This is just example.

Regards,

Martin

1,429 Views
DELPHI_Eric
Contributor III

Thank you Martin!Now,I make the following settings, the PLL1 code correctly?How can I verify the PLL1 becomes 160MHz?

#ifdef XOSC8MHZ

    #ifdef PLL0_160MHZ

    /* Setup PLL0 - 160MHz @ 8MHz XOSC */

    PLLDIG.PLL0DV.R = 0x40022050U; /* RFDPHI1 = 4, RFDPHI = 4, PREDIV = 1,

                                       MFD = 16, fVCO = 640MHz */

    #endif

#endif

#ifdef XOSC8MHZ

    #ifdef PLL1_160MHZ

    /* Setup PLL1 - 160MHz @ 8MHz XOSC */

   PLLDIG.PLL1DV.R = 0x00020004U; /* RFDPHI = 2 (divider=4), MFD = 20,

                                       fVCO = 800MHz */

    #endif

#endif

0 Kudos
1,429 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

please use this excel calculator to check your configuration.

Excel MPC5744P Clock Configurator

Regards,

Martin

1,429 Views
yunangong-b1900
NXP Employee
NXP Employee

Hi Martin,

The tool is very helpful. One question from my side is:

Is there any max/min VCO frequency specification of PLL0 and PLL1 on MPC5744P?

Best Regards

Yunan Gong

NXP Auto FAE

0 Kudos
1,429 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

please look at the data sheet.

pastedImage_0.png

pastedImage_0.png

Regards,

Martin

0 Kudos
1,429 Views
DELPHI_Eric
Contributor III

Hi,

Is there some tool like S12 Processor Expert for the MPC57xx-56xx,thanks.

0 Kudos
1,431 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

I have already answered this question in the following thread:

https://community.nxp.com/thread/436645 

Regards,

Martin

0 Kudos
1,429 Views
DELPHI_Eric
Contributor III

Already according to your configuration file, now how can I do to detect PLL1 output 160MHz? Such as bus clock output pin, with an oscilloscope measurementI mean, how to measure the MCU output pin to determine whether it is configured to 160MHz?

0 Kudos
1,429 Views
DELPHI_Eric
Contributor III

Thanks Martin!

0 Kudos