cancel
Showing results for 
Search instead for 
Did you mean: 

How to find the reset source using MC_RGM register on SPC560C50L3 controller?

vishrut nair
Associate
Posted on February 17, 2018 at 17:21

Hello Everyone,

I am currently working on SPC560C50L3 controller with SPC5 studio. How do I differentiate between different resets for Eg. watchdog reset, power ON reset etc.

Through code I want the controller to identify the source of reset.

In the reference manual, they have mentioned RGM register (RGM.FES & RGM.DES), which will help the controller to identify the type of reset. But my question is, how to use this register? 

I tried to read the RGM register in the start of my main function, but every time I was getting 0. 

There must be some way to use this register to identify the cause of last reset.

Regards,

Vishrut.

1 REPLY 1
Erwan YVIN
ST Employee
Posted on February 19, 2018 at 16:06

Hello vishrut ,

i think that it is correct

Did you use a test application from SPC5Studio ?

if yes , we remove the status after each reset

 /* RGM errors clearing.*/
 RGM.FES.R = 0xFFFFU;
 RGM.DES.R = 0xFFFFU;�?�?�?

Best regards

Erwan