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
Solved! Go to Solution.
Hi,
I have already answered this question in the following thread:
https://community.nxp.com/thread/436645
Regards,
Martin
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
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
Hi,
please use this excel calculator to check your configuration.
Excel MPC5744P Clock Configurator
Regards,
Martin
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
Hi,
please look at the data sheet.
Regards,
Martin
Hi,
Is there some tool like S12 Processor Expert for the MPC57xx-56xx,thanks.
Hi,
I have already answered this question in the following thread:
https://community.nxp.com/thread/436645
Regards,
Martin
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?
Thanks Martin!