1.5.2 Reset Handler Service

The PRIME Stack uses the PRIME Reset Handler service library to trigger system resets and to manage and store reset information.

This library redefines the functions that manage the device fault interrupt handlers and stores reset information, which is useful to investigate when, why and how many times a node has reset. The handlers that are redefined and the storage used depend on the device.

PIC32CXMT

On PIC32CXMT devices, the library redefines the following fault interrupt handlers:
  • Hard Fault
  • Memory Management
  • Bus Fault
  • Usage Fault
  • Watchdog

The reset information is stored in the GPBRs. The number of GPBRs used depends on the hardware platform and the PRIME node.

SAMD20

The SAMD20 is an Arm® Cortex®-M0+, so the library redefines only the Hard Fault and Watchdog handlers; the Memory Management, Bus Fault and Usage Fault exceptions do not exist on the Arm Cortex-M0+ and escalate to a Hard Fault.

The SAMD20 has no GPBRs, so the reset information is stored in the emulated EEPROM managed by the PRIME Storage service.