Intel 386 User Manual

Page 508

Advertising
background image

17-13

WATCHDOG TIMER UNIT

See Appendix C for included header files.

#include <dos.h>

#include <conio.h>

#include “80386ex.h”

#include “ev386ex.h”

/*****************************************************************************

ReLoadDownCounter:

Description:

This function initiates a lockout sequence which results in the

setting of the WDTEN bit in the status register. By setting

WDTEN, the software watchdog mode is enabled.

Parameters:

None

Returns:

None

Assumptions:

None

Syntax:

ReloadDownCounter();

Real/Protected Mode:

No changes required

*****************************************************************************/

void ReLoadDownCounter(void)

{

_disable(); /* Disable interrupts */

_SetEXRegWord(WDTCLR,0xf01e);

_SetEXRegWord(WDTCLR,0xfe1);

_enable(); /* Enable interrupts */

}/* ReLoadDownCounter */

/*****************************************************************************

GetWDT_Count:

Description:

Returns current value of watch dog counter.

Advertising