21.07.2015 Views

M16C User Manual.pdf

M16C User Manual.pdf

M16C User Manual.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Watchdog TimerMitsubishi microcomputers<strong>M16C</strong> / 62 GroupSINGLE-CHIP 16-BIT CMOS MICROCOMPUTER2.11 Watchdog Timer2.11.1 OverviewThe watchdog timer can detect a runaway program using its 15-bit timer prescaler. The following is anoverview of the watchdog timer.(1) Watchdog timer start procedureWhen reset, the watchdog timer is in stopped state. Writing to the watchdog timer start registerinitializes the watchdog timer to 7FFF16 and causes it to start performing a down count. The watchdogtimer, once started operating, cannot be stopped by any means other than stopping conditions.(2) Watchdog timer stop conditionsThe watchdog timer stops in any one of the following states:(a) Period in which the CPU is in stopped state(b) Period in which the CPU is in waiting state(c) Period in which the microcomputer is in hold state(3) Watchdog timer initializationThe watchdog timer is initialized to 7FFF16 in the cases given below, and begins a down count.(a) When the watchdog timer writes to the watchdog timer start register while a count is in progress(b) When the watchdog timer underflows(4) Runaway detectionWhen the watchdog timer underflows, a watchdog timer interrupt occurs. In writing a program, write tothe watchdog timer start register before the watchdog timer underflows. The watchdog timer interruptoccurs regardless of the status of the interrupt enable flag (I flag). In processing a watchdog timerinterrupt, set the software reset bit to “1” to reset software.(5) Watchdog timer cycleThe watchdog timer cycle varies depending on the BCLK and the frequency division ratio of theprescaler selected.Table 2.11.1. The watchdog timer cycleCM07 CM06 CM17 CM16 BCLK WDC7 Period0 0 0 0 16MHz0 0 0 1 8MHz0 0 1 0 4MHz0 0 1 1 1MHz0 1 Invalid Invalid 2MHz1 Invalid Invalid Invalid 32kHzNote: An error due to the prescaler occurs.0101010101InvalidApprox. 32.8ms (Note)Approx. 262.1ms (Note)Approx. 65.5ms (Note)Approx. 524.3ms (Note)Approx. 131.1ms (Note)Approx. 1.049s (Note)Approx. 524.3ms (Note)Approx. 4.194s (Note)Approx. 262.1ms (Note)Approx. 2.097s (Note)Approx. 2s (Note)426

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

Saved successfully!

Ooh no, something went wrong!