Hi,
I've been going through the datasheet SPRUHM8G to figure out how to identify the reset reason. My use cases are simple:
- Power up -> config WD to reset -> delay -> WD resets CPU -> power up -> get last reason (expect WDRS) -> run
- while running -> XRS pulled low -> power up -> config WD to IRQ -> get last reason (expect XRS) -> run
Reading the datasheet everything is pretty straight forward. for PORs look for POR and XRS flags. If they are active - there was a POR. For XRS look just at the XRS flag. The flags are there, the documentation is there.
I want to identify reasons for reset by: POR, XRS, WDRS because those flags exist, so I assume I can use them. I can identify the WDRS reason without any issues. The I come across the Reset descriptions and I notice that POR and XRS are reset by the BootROM.
So it turns out, the POR and XRS flags are useless in identifying the reason for reset. The questions I have are:
- Is there away to identify the reason for reset that would differentiate between XRS and POR?
- Is there away to tell the boot ROM to not clear those flags so I can use them?
