Bar Logo 3.8/7.6 kw Totem pole Demonstration Application (Part-No. (not specified))
 
Content
     
Loading...
Searching...
No Matches

Reset driver using dsPIC MCUs.
More...

+ Collaboration diagram for Reset Driver:

Files

file  reset_types.h
 This is the generated driver types header file for the RESET driver.
 
file  reset.c
 This is the generated driver source file for RESET driver.
 
file  reset_types.h
 This is the generated driver types header file for the RESET driver.
 
file  reset.c
 This is the generated driver source file for RESET driver.
 

Enumerations

enum  RESET_TYPES { RESET_ERROR_RCON_TRAPR = 1 , RESET_ERROR_RCON_IOPUWR = 2 , RESET_ERROR_RCON_CM = 3 , RESET_ERROR_RCON_WDTO_ISR = 4 }
 Defines the RCON error types. More...
 
enum  RESET_MASKS { RESET_MASK_POR = 0x0001 , RESET_MASK_WDTO = 0x0010 , RESET_MASK_SWR = 0x0040 , RESET_MASK_EXTR = 0x0080 , RESET_MASK_CM = 0x0200 , RESET_MASK_IOPUWR = 0x4000 , RESET_MASK_TRAPR = 0x8000 }
 Defines the RESET cause mask location
More...
 

Functions

uint16_t RESET_CauseGet (void)
 Returns the cause of previous reset.
 
void RESET_CauseHandler (void)
 It handles the reset cause by clearing the cause register values. This is a weak attribute function. The user can override and implement the same function without weak attribute.
 
void RESET_CauseClearAll (void)
 Clears the Reset Cause register.
 
static bool RESET_CauseFromTrap (uint16_t resetCause)
 RESET cause from trap.
 
static bool RESET_CauseFromIllegalOpcode (uint16_t resetCause)
 RESET cause from Illegal Opcode

 
static bool RESET_CauseFromConfigurationMismatch (uint16_t resetCause)
 RESET cause from Configuration Mismatch

 
static bool RESET_CauseFromExternal (uint16_t resetCause)
 RESET cause from External

 
static bool RESET_CauseFromSoftware (uint16_t resetCause)
 RESET cause from Software

 
static bool RESET_CauseFromWatchdogTimer (uint16_t resetCause)
 RESET cause from Watchdog Time

 
static void RESET_CauseClear (enum RESET_MASKS resetFlagMask)
 RESET cause from Clear

 

Detailed Description

Enumeration Type Documentation

◆ RESET_MASKS

Enumerator
RESET_MASK_POR 

Defines the power ON Reset flag mask location

RESET_MASK_WDTO 

Defines the watchdog timeout reset flag mask location

RESET_MASK_SWR 

Defines the software reset mask location

RESET_MASK_EXTR 

Defines the external reset mask location

RESET_MASK_CM 

Defines the configuration mismatch reset mask location

RESET_MASK_IOPUWR 

Defines the illegal opcode or uninitialized W access reset mask location

RESET_MASK_TRAPR 

Defines the trap reset mask location

Definition at line 59 of file reset_types.h.

◆ RESET_TYPES

Enumerator
RESET_ERROR_RCON_TRAPR 

A Trap Conflict Reset has occurred

RESET_ERROR_RCON_IOPUWR 

An illegal opcode detection, an illegal address mode or Uninitialized W register used as an Address Pointer caused a Reset

RESET_ERROR_RCON_CM 

A Configuration Mismatch Reset has occurred

RESET_ERROR_RCON_WDTO_ISR 

WDT time-out has occurred

Definition at line 46 of file reset_types.h.

Function Documentation

◆ RESET_CauseClear()

static void RESET_CauseClear ( enum RESET_MASKS resetFlagMask)
static

RESET cause from Clear

Definition at line 153 of file reset.c.

+ Here is the caller graph for this function:

◆ RESET_CauseClearAll()

void RESET_CauseClearAll ( void )
Parameters
none
Returns
none

Definition at line 198 of file reset.c.

◆ RESET_CauseFromConfigurationMismatch()

static bool RESET_CauseFromConfigurationMismatch ( uint16_t resetCause)
static

RESET cause from Configuration Mismatch

Definition at line 85 of file reset.c.

+ Here is the caller graph for this function:

◆ RESET_CauseFromExternal()

static bool RESET_CauseFromExternal ( uint16_t resetCause)
static

RESET cause from External

Definition at line 102 of file reset.c.

+ Here is the caller graph for this function:

◆ RESET_CauseFromIllegalOpcode()

static bool RESET_CauseFromIllegalOpcode ( uint16_t resetCause)
static

RESET cause from Illegal Opcode

Definition at line 68 of file reset.c.

+ Here is the caller graph for this function:

◆ RESET_CauseFromSoftware()

static bool RESET_CauseFromSoftware ( uint16_t resetCause)
static

RESET cause from Software

Definition at line 119 of file reset.c.

+ Here is the caller graph for this function:

◆ RESET_CauseFromTrap()

static bool RESET_CauseFromTrap ( uint16_t resetCause)
static

RESET cause from trap

Definition at line 51 of file reset.c.

+ Here is the caller graph for this function:

◆ RESET_CauseFromWatchdogTimer()

static bool RESET_CauseFromWatchdogTimer ( uint16_t resetCause)
static

RESET cause from Watchdog Time

Definition at line 136 of file reset.c.

+ Here is the caller graph for this function:

◆ RESET_CauseGet()

uint16_t RESET_CauseGet ( void )
Precondition
This function should be called before any use of CLRWDT since it has a side-effect of clearing the appropriate bits in the register showing reset cause.
Parameters
none
Returns
Returns a value corresponding to a possible cause for reset.

Definition at line 158 of file reset.c.

+ Here is the caller graph for this function:

◆ RESET_CauseHandler()

void RESET_CauseHandler ( void )
Parameters
none
Returns
none

Definition at line 163 of file reset.c.

+ Here is the call graph for this function: