AnsweredAssumed Answered

MPC5644A @ 120MHz Flash

Question asked by Ivan Zoli on Apr 18, 2017
Latest reply on Apr 19, 2017 by David Tosenovjan



I am trying to run an MPC5644A @ 120MHz from a 8MHz xtal (the one on the demoboard.

I am using this code:


void ClockSetSysClk_120MHz(void)
   ECSM.MUDCR.R = 0x40000000; // 1 SRAM waitstate for fsys above 98MHz

   FMPLL.ESYNCR2.R = 0x00000001; // Clock / 4
   FMPLL.ESYNCR1.R = 0xF000003C; // Pll X 60
   while (FMPLL.SYNSR.B.LOCK != 1) {}; // Wait for FMPLL to LOCK



This is working great running from RAM but not from FLASH. The system goes in exception (I think I lose the FLASH controller somehow...) Someone can please help me to understand what I miss?

Thank you