Hi,
I want to distinguish between soft and hard restarts, and I plan to use a piece of RAM that is not initialized by soft restarts to mark soft restarts. Is there such an example? Or how to make a soft restart of a RAM area without initialization?
Hi, could you specify used device?
Hi,I use MPC5748G chip.Is there any example for reference?
You can use the MC_ME module to enter the RESET mode (SW functional reset):
/* software functional reset */
ME.MCTL.R = 0x00005AF0;
ME.MCTL.R = 0x0000A50F;
or for SW destructive reset
ME.MCTL.R = 0xF0005AF0;
ME.MCTL.R = 0xF000A50F;
After functional reset SRAM content is preserved. You need to add to the initialization code checking of RGM module statuses to distinguish whether reset cause was destructive/functional reset and based on that perform or omit SRAM initialization.