AnsweredAssumed Answered

Problem for PIT of MPC5744P

Question asked by nathan 米 on Oct 16, 2017
Latest reply on Oct 18, 2017 by nathan 米

I want to use the PIT module of MPC5744P.

The project is attached.

The relevant configuration of PIT is as follows:

 

 MC_CGM.AC3_SC.B.SELCTL = 0x01;    //connect XOSC to the PLL0 input 

 

// Set PLL0 to 200 MHz with 40MHz XOSC reference
PLLDIG.PLL0DV.R = 0x3002100A; // PREDIV = 1, MFD = 10, RFDPHI = 2, RFDPHI1 = 6

 

MC_CGM.SC_DC0.R = 0x80030000;    // PBRIDGE0/PBRIDGE1_CLK at syst clk div by 4(50 MHz)

 

After the configuration, the clock for PIT I think is 50MHz. And then, the code for PIT is as follows: 

 

PIT_0.TIMER[0].LDVAL.R = 50000000-1;   // setup timer 0 for 1sec period

 

But when I try to debug the project, it turns out that the period of PIT is 2 sec.

 

 Is there any mistakes in my configuration? Or some other problems I did not notice?

 

Thank you.

Original Attachment has been moved to: work9_29_1.rar

Outcomes