3.8 WDT Driver

3.8.1 Introduction

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.

3.8.2 Module Documentation

3.8.2.1 WDT Driver

Watchdog Timer Driver using dsPIC MCUs.

3.8.2.1.1 Module description

Watchdog Timer Driver using dsPIC MCUs.

3.8.2.1.1.1 Definitions
  • #define WATCHDOG_CLR_KEY 0x5743

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

3.8.2.1.1.2 Functions

3.8.2.1.2 Definition Documentation

3.8.2.1.2.1 WATCHDOG_CLR_KEY

#define WATCHDOG_CLR_KEY 0x5743

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

3.8.2.1.3 Function Documentation

3.8.2.1.3.1 WATCHDOG_TimerClear()

inline static void WATCHDOG_TimerClear (void )

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

Parameters:
none
Returns:

none

3.8.2.1.3.2 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

3.8.2.1.3.3 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

3.8.3 File Documentation

3.8.3.1 source/watchdog.h File Reference

#include <xc.h>

3.8.3.1.1 Functions

3.8.3.1.2 Macros

  • #define WATCHDOG_CLR_KEY 0x5743

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

3.8.3.1.3 Detailed Description

WATCHDOG Generated Driver Header File