beautypg.com

Wd enabling sequence, Wd status register – Rainbow Electronics AT75C220 User Manual

Page 143

background image

AT75C220

143

WD Status Register

Name:

WD_SR

Access:

Read-only

WDOVF: Watchdog Overflow

0 = No watchdog overflow.

1 = A watchdog overflow has occurred since the last restart of the watchdog counter or since internal or external reset.

WD Enabling Sequence

To enable the Watchdog Timer the sequence is as follows:

1.

Disable the Watchdog by clearing the bit WDEN:

Write 0x2340 to WD_OMR

This step is unnecessary if the WD is already disabled
(reset state).

2.

Initialize the WD Clock Mode Register:

Write 0x373C to WD_CMR
(HPCV = 15 and WDCLKS = MCK/8)

3.

Restart the timer:

Write 0xC071 to WD_CR

4.

Enable the watchdog:

Write 0x2345 to WD_OMR (interrupt enabled)

31

30

29

28

27

26

25

24

23

22

21

20

19

18

17

16

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

WDOVF