23.04.2013 Views

TMPM330 - Keil

TMPM330 - Keil

TMPM330 - Keil

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

14.2 Watchdog Timer Interrupt<br />

Under development<br />

<strong>TMPM330</strong> (rev 0.4) 14-2<br />

<strong>TMPM330</strong><br />

The watchdog timer consists of the binary counters that are arranged in 26 stages and work using the<br />

fSYS/2 system clock as an input clock. The outputs produced by these binary counters are 2 16 , 2 18 , 2 20 ,<br />

2 22 , 2 24 are 2 26 .By selecting one of these outputs with WDMOD , a watchdog timer<br />

interrupt can be generated and the WDTOUT is output when an overflow occurs, as shown in Fig.<br />

14-2.<br />

Because the watchdog timer interrupt is a non-maskable interrupt factor, NMIFLG at the<br />

INTC performs a task of identifying it.<br />

The output pin of the watchdog timer can reset the peripherals by outputting “0” caused by an<br />

overflow. The output is set to “1”if the watchdog timer is cleared (if the clear code 4EH is written to the<br />

WDCR register). The WDTOUT pin outputs “0” at normal mode unless the clear code is written to<br />

WDCR register.<br />

WDT counter<br />

WDT interrupt<br />

WDT clear<br />

WDTOUT<br />

Fig. 14-2 Normal Mode<br />

When an overflow occurs, resetting the chip itself is an option to choose. If the chip is reset, a reset is<br />

affected for a 32-state time, as shown in Fig. 14-3. If this reset is affected, the clock fSYS that the clock<br />

gear generates by dividing the clock fC of the high-speed oscillator by 1 is used as an input clock fSYS.<br />

WDT counter<br />

WDT interrupt<br />

Internal reset<br />

WDTOUT<br />

n Overflow<br />

n<br />

Overflow<br />

Fig. 14-3 Reset Mode<br />

Write of a clear code<br />

32-state<br />

(3.2 μs @ fosc = 10 MHz, fC = fsys = 10 MHz,)<br />

0<br />

Watchdog Timer

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!