How to get soft restart and hard restart

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get soft restart and hard restart

703 Views
1009427882
Contributor III

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?

0 Kudos
3 Replies

609 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, could you specify used device?

0 Kudos

609 Views
1009427882
Contributor III

Hi,I use MPC5748G chip.Is there any example for reference?

0 Kudos

609 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

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.

0 Kudos