XMC4800 Understanding reasons for last reset

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User10215
Level 4
Level 4
First like received
Hello everybody,

the XMC4800 features a bitfield RSTSTAT.RSTSTAT where the bits show the reason for the last reset. I want to use this bitfield in my application. However I have trouble in understanding when some of the bits will be set. For instance I had a look into the "xmc4_scu.h" version 2.1.2. It says in a comment for the enum XMC_SCU_RESET_REASON_t that the bit 0x02 shows a "Serial wire debugger reset" and the reference manual says it shows a "SWD reset". However this bit is always set after I remove the power-supply to my board even though no debugger is connected (yes, I clear the bitfield after reading the value of RSTSTAT.RSTSTAT). Could it be that "SWD" doesn't mean "Serial Wire Debugger" but "Supply Watchdog"?
Also, under which condition will the "CPU lockup reset"-bit be set? Is there a clear explanation out there which tells me what all the bits mean?

So far this is what I'm guessing:
PORST = Reset Pin was pulled low
SWD = Supply voltage fell under the reset threshold
PV = Supply voltage fell under the power validation threshold
CPU System reset = Software reset
CPU lockup reset = ?
WDT = Watchdog timer reset
Parity Error = Memory check found a parity error

Regards,
Niclas
0 Likes
1 Reply
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi,

the XMC4800 features a bitfield RSTSTAT.RSTSTAT where the bits show the reason for the last reset. I want to use this bitfield in my application.
However I have trouble in understanding when some of the bits will be set.


For instance I had a look into the "xmc4_scu.h" version 2.1.2. It says in a comment for the enum XMC_SCU_RESET_REASON_t that the bit 0x02 shows a "Serial wire debugger reset" and the reference manual says it shows a "SWD reset".However this bit is always set after I remove the power-supply to my board even though no debugger is connected (yes, I clear the bitfield after reading the value of RSTSTAT.RSTSTAT).

Bit 2 of RSTSTAT is referring to the SWD reset (Supply Watchdog). This is a mistake from DAVE4 and we will feedback accordingly.

2112.attach


Also, under which condition will the "CPU lockup reset"-bit be set? Is there a clear explanation out there which tells me what all the bits mean?

Yes, please have a look at this chapter.

2108.attach
0 Likes