1.5.2.2 Using The Library

The PRIME Reset Handler service library is called by the fault interrupt handlers as well as by the user application and the PRIME Library when they need to trigger a reset.

To read the reset information stored in the GPBRs, the PRIME User PIBs library is used (see User PIBs Service).

The following example illustrates how to trigger a reset from the user application.

Example of PRIME Reset Handler library usage

#include <string.h>
#include "app.h"
#include "service/reset_handler/srv_reset_handler.h"
#include "bsp/bsp.h"

void APP_Tasks ( void )
{
    /* Trigger reset */
    SRV_RESET_HANDLER_RestartSystem(RESET_HANDLER_SOFTWARE_RESET);
}