I'm not able to manage Freescale MAC7100 doze mode keeping alive the RTI module.
To start RTI I use the following code:
PIT.TLVAL[0].B.TSV = System_Clock/2*1000*bt; PIT.INTEN.B.RTIE = 1; // Pit interrupt enable PIT.CTRL.B.MDIS = 0; // Module Enable PIT.EN.B.PEN0 = 1; INTC.IMRL.B.IMR22 = 0;
To handle the interrupt I use the following code:
PIT.EN.B.PEN0 = 0; PIT.EN.B.PEN0 = 1; PIT.FLG.B.RTIF = 1; // clear the flag
OK, the RTI interrupt handler (interrupt 22) is periodically called.
To enter the doze mode I use the following code:
MCM.MWCR.R=0x80; CRG.CLKSEL.B.PLLSEL = 0; // 8 MHz CRG.SDMCTL.B.DOZE = 1; // DOZE MODE
I also have:
CRG.PITCTRL.DOZE = 0 CRG.CLKSEL.RTIDOZE = 0
When I enter doze mode the PIT interrupt handler stops to be called.
Any help?
Thanks, Marco O.