we have some custom PCB based on G400-S module. A few pieces of these PCBs reset randomly from time to time. Our application logs Reset Controller Status Register(RSTC_SR, address 0xFFFFFE04) after every reset.
Here is a piece of code used for RSTC_SR register reading:
Register RSTC_SR = new Register(0xFFFFFE04);
uint value = RSTC_SR.Value;
FileLogger.Instance.TryToLog("" + " RSTC_SR value: 0x" + value.ToString(“X8”));
These PCBs have always reset cause 0x00010400 which means according SAM9X35 datasheet: “User Reset”(NRST pin detected low). So my suspicion is that reset buttons(micro-switch) connected to the G400 NRST processor reset pin are not reliable and might cause the unintended reset because when I press reset button the cause of the reset is the same: 0x00010400 “User Reset”.
What is strange to me is the fact that bit0 from RSTC_SR register called URSTS(User Reset Status) is not set although this bit should mean:
0 = No high-to-low edge on NRST happened since the last read of RSTC_SR.
1 = At least one high-to-low transition of NRST has been detected since the last read of RSTC_SR.
I suppose the bit URSTS should be “1” (so RSTC_SR register should be read as 0x00010401) when reset button is pressed because high-to-low transition is generated on NRST pin through reset button which connects zero level on NRST pin during press.
Shouldn’t be also bit16 called NRSTL(NRST Pin Level) in low level(“0”) during reset? I read this bit always as “1”.
Do you have the same experience?
Next question is what type of reset is generated when sw. reset through NETMF method “PowerState.RebootDevice(true)” is used? Does it use special “Software Reset” instruction causes “Software Reset” or it is just “simple” jump to zero address?
Is it possible to somehow recognize the reset caused by e.g. runtime application errors(some overflow, exception etc.) ?
Thanks for your suggestions.