lpcware

LPC1850 - Determining cause of last reset

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by surrealist14 on Fri Aug 09 14:06:50 MST 2013
Many processors have a status register that allows a programmer to determine the cause of the last reset.  In my case, I'm using an LPC1850.  The diagram in the users manual shows that the potential sources for a CORE_RST are:

* _RESET
* _POR
* BOD reset
* WWDT reset
* PMC reset

Can anyone provide an example of some code that determines the cause of the last reset on the LPC18XX?  According to an apps engineer at NXP, we shouldn't use the RGU for this purpose, because a core reset will cause the RGU block itself to be reset, and all of its values will be set to default values.

Thanks for any/all help!

Outcomes