Cypress F2MC-8FX Series Toepassingsnotitie - Pagina 8
Blader online of download pdf Toepassingsnotitie voor {categorie_naam} Cypress F2MC-8FX Series. Cypress F2MC-8FX Series 16 pagina's. How to make on-board debug
Ook voor Cypress F2MC-8FX Series: How-To (14 pagina's)
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. (WDTC:CS1,CS0,CSP)
3.
Activate the watchdog timer.
4.
Clear the watchdog timer within the minimum interval time. (WDTC:WTE3 to WTE0 = 0101
Refer Table 2.
The following example shows how to set up watchdog Timer for operation with software mode.
/* initial watchdog timer */
void
InitWDT (void)
{
WDTC = 0x05;
}
/* main routine */
void
main (void)
{
InitWDT();
...
WDTC |= 0x05;
}
main.c
#define
HWD_DISABLE
;------------------------------------------------------------------------
; Hard Watchdog
;------------------------------------------------------------------------
#ifdef
#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.
www.cypress.com
values are "A596
, FFBF
H
H
(WDTC:WTE3 to WTE0 = 0101
// set count clock is 2
// start WDT counter
// clear WDT counter
HWD_DISABLE
.SECTION
WDT, CONST, LOCATE=H'FFBE
.DATA.W
0xA596
Document No. 002-05336 Rev.*A
F²MC-8FX Family, MB95200H/210H Series Watchdog Timer
" (NVR flash area)
H
)
B
21
/F
CH
)
B
7