- // TODO: Enable_all_internal_pull_devices (PULL_DOWN);\r
-\r
- /* Save context and execute wait instruction.\r
- *\r
- * Things that matter here are\r
- * - Z1VEC, determines where TLB0 will point. TLB0 is written with a\r
- * value at startup that 4K aligned to this address.\r
- * - LowPower_Sleep() will save a interrupt context so we will return\r
- * intact.\r
- * - For devices with little RAM we don't want to impose the alignment\r
- * requirements there. Almost as we have to occupy a 4K block for this..\r
- * although the code does not take that much space.\r
- * */\r
- McuE_EnterLowPower(mcuMode);\r
-\r
- /* Clear sleep flags to allow pads to operate */\r
- CRP.PSCR.B.SLEEPF = 0x1;\r
-\r
-#elif defined(CFG_MPC5516)\r
- uint32 timeout;\r
- /* Set the sleep bit; following a WAIT instruction, the device will go to sleep */\r
- CRP.PSCR.B.SLEEP = 1;\r
- /* enable the 1.2V internal regulator when in sleep mode only */\r
- CRP.PSCR.B.STOP12EN = 1;\r
- /* 0x1 8k, 0x2 16k, 0x3 32k, 0x6 64k -- RAMs maintain power */\r
- CRP.PSCR.B.RAMSEL = 0x7; // Keep all 80K\r
-\r
- CRP.Z1VEC.R = (uint32)&McuE_LowPowerRecoverFlash;\r
-#if defined(CFG_VLE)\r
- CRP.VLE = 1;\r
-#endif\r
-\r
- /* If we "Mcu_Wakeup()" is located in RAM, set FASTREC */\r
- CRP.RECPRTR.B.FASTREC = 0;\r