Software Watchdog Timer - Fujitsu F2MC-8FX MB95200H/210H Series Application Note

8-bit microcontroller watchdog timer
Hide thumbs Also See for F2MC-8FX MB95200H/210H Series:
Table of Contents

Advertisement

4.2 Software watchdog timer

Setting Procedure Example
The software watchdog timer is set up through the following procedure:
1) Ensure that the address FFBE
2) Select the count clock.
3) Activate the watchdog timer. (WDTC:WTE3 to WTE0 = 0101
4) Clear the watchdog timer within the minimum interval time. (WDTC:WTE3 to WTE0 =
0101
)
B
Refer Table 3-1.
The following example shows how to set up watchdog Timer for operation with software
mode.
/* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS.
/* FUJITSU MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY
/* FOR ANY ERRORS OR ELIGIBILITY FOR ANY PURPOSES.
/*
(C) Fujitsu Microelectronics (Shanghai) Co., LTD.
/* Date: 20080320
/*--------------------------------------------------------------------*/
/* initial watchdog timer */
void
InitWDT (void)
{
WDTC = 0x05;
}
/* main routine */
void
main (void)
{
InitWDT();
...
WDTC |= 0x05;
}
main.c
#define
HWD_DISABLE
;------------------------------------------------------------------------
; Hard Watchdog
;------------------------------------------------------------------------
#ifdef
HWD_DISABLE
.SECTION
#endif
startup.asm
Refer to Appendix Sample Code for project "SWWDT".
Please note that once the watchdog timer is activated, it cannot be stopped until a reset is
generated.
WATCHDOG TIMER V1.1
Chapter 4 Usage and Examples
, FFBF
H
(WDTC:CS1,CS0,CSP)
Version: 1V0
// set count clock is 2
// start WDT counter
// clear WDT counter
WDT, CONST, LOCATE=H'FFBE
.DATA.W
0xA596
MCU-AN-500013-E-11 – Page 10
values are "A596
" (NVR flash area)
H
H
Author: Levi
21
/F
CH
)
B
*/
*/
*/
*/
*/

Advertisement

Table of Contents
loading

Table of Contents