Hi,
I ran the example code(XPC567XFKIT-PinToggleStationery-V0_4.zip) on MPC567XKIT516-PT Development board . It ran normal,But I found that the PIT interrupt cycle is not 1s while the code is set to 1s, this is original code, I have not changed.as follows:
static void PIT3_init(void)
{
/* define 1 second interval based on frequency */
#if defined(CORE_CLOCK_264MHz)
#define PIT_interval_1s 26400000
#elif defined(CORE_CLOCK_200MHz)
#define PIT_interval_1s 20000000
#elif defined(CORE_CLOCK_150MHz)
#define PIT_interval_1s 15000000
#else // 60MHz
#define PIT_interval_1s 6000000
#endif
/* 30: MDIS = 0 to enable clock for PITs. */
/* 31: FRZ = 1 for Timers stopped in debug mode */
PIT.MCR.R = 0x00000001;
PIT.CH[3].LDVAL.R = PIT_interval_1s - 1;
/* clear the TIF flag */ PIT.CH[3].TFLG.R = 0x00000001;
/* 30: TIE = 1 for interrupt request enabled */
/* 31: TEN = 1 for timer active */
PIT.CH[3].TCTRL.R = 0x00000003;
}
Could you give me some advice? thank you!
Solved! Go to Solution.
Hi,
there was few mistakes in the example, now it is corrected, see
https://community.nxp.com/docs/DOC-102744
BR, Petr
Hi,
there was few mistakes in the example, now it is corrected, see
https://community.nxp.com/docs/DOC-102744
BR, Petr