|
12 Watch Dog Timer
1. Enable Watchdog (also active in STOP mode); Set WDI clock rate as 25000Hz/512 = 48.8 Hz and WDT reset clock rate as 25000Hz/512/8 = 6.1Hz, that is, the watchdog will reset when the eighth WDI occurs.
;After enabling Watchdog in IDE, perform the following settings
;Note :The only way to modify the content of control registers located between $30 and $36 is
;by double writing access with certain address.
lda #(C_WDT_SCKEN+C_WDT_Div_512)
sta P_WDT_Ctrl
sta P_WDT_Ctrl
set P_INT_Flag0,CB_INT_WDIF
set P_INT_Ctrl0,CB_INT_WDIE
cli |
2. Enable Watchdog (also active in STOP mode); Set WDT reset clock rate as 25000Hz/512/8 = 6.1Hz and no WDI occurs.
;After enabling Watchdog in IDE, perform the following settings
;Note :The only way to modify the content of control registers located between $30 and $36 is
;by double writing access with certain address.
lda #(C_WDT_SCKEN+C_WDT_Div_512)
sta P_WDT_Ctrl
sta P_WDT_Ctrl
|
3. Enable Watchdog (inactive in STOP mode); Set WDI clock rate as 25000Hz/512 = 48.8 Hz and WDT reset clock rate as 25000Hz/512/8 = 6.1Hz, that is, the watchdog will reset when the eighth WDI occurs.
; After enabling Watchdog in IDE, perform the following settings
;Note :The only way to modify the content of control registers located between $30 and $36 is
;by double writing access with certain address.
lda #C_WDT_Div_512
sta P_WDT_Ctrl
sta P_WDT_Ctrl
set P_INT_Flag0,CB_INT_WDIF
set P_INT_Ctrl0,CB_INT_WDIE
cli |
4. Enable Watchdog (inactive in STOP mode); Set WDT reset clock rate as 25000Hz/512/8 = 6.1Hz and no WDI occurs.
;After enabling Watchdog in IDE, perform the following settings
;Note :The only way to modify the content of control registers located between $30 and $36 is
;by double writing access with certain address.
lda #C_WDT_Div_512
sta P_WDT_Ctrl
sta P_WDT_Ctrl |
|