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

Deadman Timer (DMT) driver using dsPIC MCUs. The functionality is to interrupt the processor in the event of a software malfunction. More...

+ Collaboration diagram for DMT Driver:

Files

file  dmt.c
 This is the generated driver source file for DMT driver.
 
file  dmt.c
 This is the generated driver source file for DMT driver.
 

Functions

void DMT_Initialize (void)
 Initializes the DMT module.
 
void DMT_PreClear (void)
 Writes the PreClear Pattern for DMTPRECLR register.
 
void DMT_Enable (void)
 Enables the DMT module.
 
void DMT_Clear (void)
 Checks the PreClear Status and clears the DMT Fetch Counter.
 
bool DMT_IsWindowOpen (void)
 Returns the Window Open status.
 
bool DMT_IsPreCleared (void)
 Checks for the PreClear sequence was initiated and done before the Clear sequence is done.
 
uint32_t DMT_TimeoutCounterGet (void)
 Reads the DMT counter register.
 
uint32_t DMT_WindowTimeoutCounterGet (void)
 Reads the DMT Window Interval Counter.
 
uint16_t DMT_StatusGet (void)
 Gets the DMT status.
 
uint32_t DMT_CounterGet (void)
 Returns the current counter value.
 
uint32_t DMT_CalibratedCounterGet (void)
 Returns the current counter value.
 
void DMT_EventCallbackRegister (void(*handler)(void))
 This function can be used to override default callback and to define custom callback for DMT Event event.
 
void DMT_EventCallback (void)
 This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using DMT_EventCallbackRegister.
 

Detailed Description

Function Documentation

◆ DMT_CalibratedCounterGet()

uint32_t DMT_CalibratedCounterGet ( void )
Precondition
Value will be compensated for the instructions involved in call-stack-push, reading SFR and call-stack-pop operations.
Parameters
none
Returns
Returns the 32 bit counter value

◆ DMT_Clear()

void DMT_Clear ( void )
Precondition
DMT_PreClear() should be called for the associated function to work
Parameters
none
Returns
none

Definition at line 79 of file dmt.c.

◆ DMT_CounterGet()

uint32_t DMT_CounterGet ( void )
Precondition
Value will not be compensated for the instructions involved in call-stack-push, reading SFR and call-stack-pop operations.
Parameters
none
Returns
Returns the 32 bit counter value

Definition at line 127 of file dmt.c.

◆ DMT_Enable()

void DMT_Enable ( void )
Parameters
none
Returns
none

Definition at line 65 of file dmt.c.

◆ DMT_EventCallback()

void DMT_EventCallback ( void )
Parameters
none
Returns
none

Definition at line 142 of file dmt.c.

+ Here is the caller graph for this function:

◆ DMT_EventCallbackRegister()

void DMT_EventCallbackRegister ( void(*)(void) handler)
Parameters
[in]handler- Address of the callback function.
Returns
none

Definition at line 134 of file dmt.c.

+ Here is the caller graph for this function:

◆ DMT_Initialize()

void DMT_Initialize ( void )
Parameters
none
Returns
none

Definition at line 54 of file dmt.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DMT_IsPreCleared()

bool DMT_IsPreCleared ( void )
Parameters
none
Returns
true - PreClear sequence performed successfully
false - PreClear sequence failed

Definition at line 101 of file dmt.c.

◆ DMT_IsWindowOpen()

bool DMT_IsWindowOpen ( void )
Parameters
none
Returns
true - Window Open status bit is set
false - Window Open status bit is not set

Definition at line 89 of file dmt.c.

◆ DMT_PreClear()

void DMT_PreClear ( void )
Precondition
This function should be called before calling DMT_Clear
Parameters
none
Returns
none

Definition at line 71 of file dmt.c.

◆ DMT_StatusGet()

uint16_t DMT_StatusGet ( void )
Parameters
none
Returns
status value of DMT

Definition at line 120 of file dmt.c.

◆ DMT_TimeoutCounterGet()

uint32_t DMT_TimeoutCounterGet ( void )
Parameters
none
Returns
32 bit timeout counter value

Definition at line 106 of file dmt.c.

◆ DMT_WindowTimeoutCounterGet()

uint32_t DMT_WindowTimeoutCounterGet ( void )
Parameters
none
Returns
32-bit window interval counter value

Definition at line 113 of file dmt.c.