RCM_SRS is not updating

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

RCM_SRS is not updating

586 Views
Sudhir_n
Contributor I

Hi,
I am using MKE15Z series controller in my project.
Currently I am using 128kb micro MKE15Z128VLH7 which is working fine, but due to it's memory limitations needs to change it with 256kb micro MKE15Z256VLH7. I have updated required settings in IAR IED and also updated linker file.

In my code I have a condition to reset micro controller by watchdog on the basis of RCM_SRS register.  initial value for RCM_SRS = 0x00000400. due to which below condition is true and reset the 

if(((RCM->SRS & RCM_SRS_POR_MASK) == RCM_SRS_POR_MASK) ||
((RCM->SRS & RCM_SRS_LVD_MASK) == RCM_SRS_LVD_MASK) ||
((RCM->SRS & RCM_SRS_LOCKUP_MASK) == RCM_SRS_LOCKUP_MASK) ||
((RCM->SRS & RCM_SRS_SW_MASK) == RCM_SRS_SW_MASK) ||
((RCM->SRS & RCM_SRS_PIN_MASK) == RCM_SRS_PIN_MASK) ||
((RCM->SRS & RCM_SRS_LOC_MASK) == RCM_SRS_LOC_MASK))
{
watchdog_test_setup_ke1x(); // this will rest the micro
}

when controller is reset, bit 5 in RCM_SRS register is not updating. This is the problem which I am facing. after reset due to watchdog time out RCM_SRS value should be = 0x00000020.

1 Reply

456 Views
CVSta
Contributor III

Hello @Sudhir_n  !
I'm never worked with IAR, but I could try to help you.

Please, could you have a look in this topic:
https://community.nxp.com/t5/S32K/S32K146-RCM-SRS-Register-value-for-SWD-reset/m-p/998710


And there is another topic here, but I think it isn't the same microcontroller are you using. Sometimes it make sense for your project:
https://community.nxp.com/t5/S32K/WatchDog-reset-Issues-with-S32DS-2018-R1-build-id-180815/m-p/11885...

Tks.

0 Kudos