Atmel Software Framework

Quick start guide for reset cause service

This is the quick start guide for the Reset Cause service, with step-by-step instructions on how to configure and use the driver in a selection of use cases.

The use cases contain several code fragments. The code fragments in the steps for setup can be copied into a custom initialization function, while the steps for usage can be copied into, e.g., the main application function.

Basic use case

In this basic use case, the reset cause service is used for checking if the last reset was a watchdog reset.

Setup steps

Example code

Add to application C-file:

// Do action due to last reset being a watchdog reset


  1. Check for watchdog reset flag:
    • Attention
      Please consult the specific device datasheet on which reset causes that are supported.
  2. Insert your own code taking action here. E.g.: Increase a watchdog reset counter.
  3. Reset flag if the flag was set to make sure it's not falsely detected in another reset:

Advanced use cases

For more advanced use of the Reset Cause service, see the following use cases: