Why can not I do a system reset on software code instead of power?

cancel
Showing results for 
Search instead for 
Did you mean: 

Why can not I do a system reset on software code instead of power?

264 Views
Contributor II

Hello,

       I want to do a system reset at the end of my program on 5675K.And I write the code on the end of my programme.But the programme can not do a system reset by itself.So I only do a system reset on power.Why?

      The reset code is:

    

ME.MCTL.R = 0x00005AF0;/*复位*/

   ME.MCTL.R = 0x0000A50F;

Labels (1)
10 Replies

10 Views
NXP Employee
NXP Employee

If you want to do SW functional reset set:

0x00005AF0

0x0000A50F

for SW destructive reset set:

0xF0005AF0

0xF000A50F

pastedImage_0.png

Peter

0 Kudos

10 Views
NXP Employee
NXP Employee

Hi,

I recommend you to read reference manual chapter 46.4.1 Reset state machine to have a good view how resets works.

Peter

0 Kudos

10 Views
NXP Employee
NXP Employee

Hi,

It should looks like;

ME.MCTL.R = 0xF0005AF0;

ME.MCTL.R = 0xF000A50F;

Peter

10 Views
Contributor II

Hello,Peter

My program can not do the system reset with you code.I am doing the CAN bootloader .I need do the software reset on the end of the CAN bootloader program.After reset,it will jump to the 0x00000000 to run the application program.But the CAN bootloader programm can not jump normally! There is hardware initialization in CAN bootloader programm. So I suspect that there are some programme about hardware initialization.

Can you give me some hardware initialization projects about reset?

Thank you!

0 Kudos

10 Views
NXP Employee
NXP Employee

Hi,

Believe me my code do a Software Destructive RESET exactly like it is described in reference manual

pastedImage_0.png

Also if you check the debugger you will see the F_SOFT_DEST flag set in RGM[DES] register.

pastedImage_1.png

After reset SSCM module search for valid RCHW on bootable locations.

The device boots from first valid RCHW. On offset 0x4 from valid boot address is jump to user code start address.

Peter

10 Views
Contributor III

Hi Peter ,

I need to do a SWT destructive reset for MPC5606B ,but I can't find this in the data sheet ,any alternative for this value for MPC5606B ??

0 Kudos

10 Views
NXP Employee
NXP Employee

Your SWT can trigger destructive reset.

let in SW your SWT expire and you will get it.

0 Kudos

10 Views
Contributor III

Hello Peter ,

Thanks for answering ,is there any other destructive resets that can be forced by software for MPC5606B ?

0 Kudos

10 Views
NXP Employee
NXP Employee

Hi,

You can see all the destructive reset sources in DES register:

pastedImage_1.png

So SWT or Voltage violation. For example you can control external SBC with SW via SPI/CAN or so.

10 Views
Contributor II

HI,

My program still can't do software reset .But it can do it with Power-on.Why?Is there difference of priority between software reset and Power-on reset?

Thank you!

Xue

0 Kudos