Problem in setting the system clock for MPC5744P

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

Problem in setting the system clock for MPC5744P

593 Views
nathan_
Contributor IV

I want to set the PLL0_PHI to 1 MHz with a 10MHz XOSC.

My code is as follows:

/* Configure PLL0 to 1 MHz with a 10MHz XOSC. */
PLLDIG.PLL0DV.B.RFDPHI1 = 10;
PLLDIG.PLL0DV.B.RFDPHI = 20;
PLLDIG.PLL0DV.B.PREDIV = 5;
PLLDIG.PLL0DV.B.MFD = 10;

// 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

When I debug the code, I find that the program stops at the following line:

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

which means the mode transition to RUN0 never completes

But when I change the number of PLLDIG to 

PLLDIG.PLL0DV.B.RFDPHI1 = 4;
PLLDIG.PLL0DV.B.RFDPHI =4;
PLLDIG.PLL0DV.B.PREDIV = 1;
PLLDIG.PLL0DV.B.MFD = 16;

 the program has no problem.

 

I wonder what's wrong with my previous code? Is there any regulations about the PLLDIG register I don't know?

Thank you.

0 Kudos
2 Replies

418 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, such configuration is out of tolerance

pastedImage_2.png

418 Views
nathan_
Contributor IV

Thanks for your remind.

0 Kudos