Problem in setting the system clock for MPC5744P

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Problem in setting the system clock for MPC5744P

590 次查看
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 项奖励
2 回复数

415 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, such configuration is out of tolerance

pastedImage_2.png

415 次查看
nathan_
Contributor IV

Thanks for your remind.

0 项奖励