Microchip® Advanced Software Framework

rstc.h File Reference

SAM Reset Controller (RSTC) driver.

Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.

#include <compiler.h>

Macros

#define RSTC_BACKUP_RESET   (1 << RSTC_SR_RSTTYP_Pos)
 
#define RSTC_CPMR_KEY_PASSWD   RSTC_CPMR_CPKEY(0x5AU)
 
#define RSTC_GENERAL_RESET   (0 << RSTC_SR_RSTTYP_Pos)
 
#define RSTC_NRST_HIGH   (HIGH << 16)
 
#define RSTC_NRST_LOW   (LOW << 16)
 
#define RSTC_SOFTWARE_RESET   (3 << RSTC_SR_RSTTYP_Pos)
 
#define RSTC_USER_RESET   (4 << RSTC_SR_RSTTYP_Pos)
 
#define RSTC_WATCHDOG_RESET   (2 << RSTC_SR_RSTTYP_Pos)
 

Functions

static void rstc_assert_reset_of_coprocessor (Rstc *p_rstc, const uint32_t reset)
 Assert the reset of the Co-processor. More...
 
static void rstc_deassert_reset_of_coprocessor (Rstc *p_rstc, const uint32_t reset)
 Deassert the reset of the Co-processor. More...
 
void rstc_disable_user_reset (Rstc *p_rstc)
 Disable User Reset. More...
 
void rstc_disable_user_reset_interrupt (Rstc *p_rstc)
 Disable the User Reset interrupt. More...
 
void rstc_enable_user_reset (Rstc *p_rstc)
 Enable User Reset. More...
 
void rstc_enable_user_reset_interrupt (Rstc *p_rstc)
 Enable the User Reset interrupt. More...
 
uint32_t rstc_get_reset_cause (Rstc *p_rstc)
 Get the reset cause. More...
 
uint32_t rstc_get_status (Rstc *p_rstc)
 Get the RSTC status. More...
 
void rstc_reset_extern (Rstc *p_rstc)
 Asserts the NRST pin for external resets. More...
 
void rstc_set_external_reset (Rstc *p_rstc, const uint32_t ul_length)
 Set the external reset length. More...
 
void rstc_start_software_reset (Rstc *p_rstc)
 Perform a Software Reset. More...