AnsweredAssumed Answered

Implement function in RAM

Question asked by vanima.nooshin on Sep 28, 2015
Latest reply on Oct 6, 2015 by Erwan Y

Hello Forum members,

I am trying to implement a Function On RAM But i did not find any thing on st Refrences.
I found this example in freescale but spcstudio can not compile the code .


__declspec(section ".text_in_ram")
static void EnterStandbyFromSRAM(void)
{
    /* Switch off the IRC fast */   
    ME.STANDBY0.B.IRCON = 0;
   
    /* keep flashes power off in DRUN */   
    ME.DRUN.B.DFLAON = 0b01;
    ME.DRUN.B.CFLAON = 0b01;
   
    /* configure fast wakeup from backup SRAM */
    RGM.STDBY.R = 0x0080;
   
    ME.MCTL.R = 0xD0005AF0; /* Enter STANDBY0 Mode & Key */
    ME.MCTL.R = 0xD000A50F; /* Enter STANDBY0 Mode & Inverted Key */
   
    /* it is recommended to poll S_MTRANS after requesting */
    /* STOP, HALT or STANDBY modes */
    while(1 == ME.GS.B.S_MTRANS)
    {       
    }
}


Thanks
Best Regards
Nazerian Vanima

Outcomes