Hi Jing,
I want to know the cause of the reset, and when the microcontroller starts working I read RCM_SRS0 and RCM_SRS1 registers.
When a reset is caused by some reprogramation, I read in the RCM_SRS0 register the value of 0x40, which makes sense because I connect the reset pin of the JTAG connector in this pin.
When the microcontroller is reset because I switch off the power supply, I expect to read the value of 0x80 in RCM_SRS0 register, which indicates the reset has been caused by the power-on detection logic. However, I read in RCM_SRS1 register the value of 0x2, which indicates the reset has been caused by the ARM core indication of a LOCKUP event... I read the same value in RCM_SRS1 register when I force a watchdog reset, and in this case I expect to read the value of 0x2 in RCM_SRS0 register, which indicates the reset has been caused by watchdog reset.
Regards,
Carmen.