2.29.8 WDT Driver

Overview

The WatchDog Timer(WDT) resets the device during software malfunction. It can also be used to wake the device from Sleep mode or Idle mode. The WDT consists of a programmable prescaler and postscaler.

Features

  • WDT can be enabled or disabled by the user, by default WDT is disabled.
  • The WDT has an optional Windowed mode, this mode is useful for resetting the device during unexpected quick or slow execution of a critical portion of the code.
  • WDT period is user configurable.
  • If WDT is enabled by Hardware (Configuration bits), it cannot be disabled by software.

2.29.8.1 Module Documentation

2.29.8.1.1 WDT Driver

Watchdog Timer Driver using dsPIC MCUs.

Module description

Watchdog Timer Driver using dsPIC MCUs.

Definitions
  • #define WATCHDOG_CLR_KEY 0x5743

    This macro holds the key value to clear Watchdog Timer (WDT)

Functions

Definition Documentation

WATCHDOG_CLR_KEY

#define WATCHDOG_CLR_KEY 0x5743

This macro holds the key value to clear Watchdog Timer (WDT)

Function Documentation

WATCHDOG_TimerClear()

inline static void WATCHDOG_TimerClear (void )

This inline function is used to clear the Watchdog Timer (WDT)

Parameters:
none
Returns:

none

WATCHDOG_TimerSoftwareDisable()

inline static void WATCHDOG_TimerSoftwareDisable (void )

This inline function is used to disable the Watchdog Timer (WDT) using the software bit.

Parameters:
none
Returns:

none

WATCHDOG_TimerSoftwareEnable()

inline static void WATCHDOG_TimerSoftwareEnable (void )

This inline function is used to enable the Watchdog Timer (WDT) using the software bit.

Parameters:
none
Returns:

none

2.29.8.2 File Documentation

2.29.8.2.1 source/watchdog.h File Reference

#include <xc.h>

Functions

Macros

  • #define WATCHDOG_CLR_KEY 0x5743

    This macro holds the key value to clear Watchdog Timer (WDT)

Detailed Description

WATCHDOG Generated Driver Header File