This example code uses M251 LDROM to log system events including count of power-on, power-down, hard fault and watchdog timer (WDT) reset. Program execution addresses of hard fault and WDT reset are also recorded.
Users could dump these event logs to check if there is any unexpected behavior of their application. Also, logging execution address of hard fault and WDT reset occurred may help to find root cause of exceptions.This example code does not require additional external hardware modules.