参数资料
型号: MX10EXAQI
厂商: MACRONIX INTERNATIONAL CO LTD
元件分类: 微控制器/微处理器
英文描述: 16-BIT, FLASH, 30 MHz, MICROCONTROLLER, PQCC44
封装: PLASTIC, LCC-44
文件页数: 24/55页
文件大小: 476K
代理商: MX10EXAQI
30
P/N:PM0625 Specifications subject to change without notice, contact your sales representatives for the most update information. REV. 1.0, JUL. 01, 2005
MX10EXA
WATCHDOG TIMER
The watchdog timer subsystem protects the system from
incorrect code execution by causing a system reset when
the watchdog timer underflows as a result of a failure of
software to feed the timer prior to the timer reaching its
terminal count. It is important to note that the watchdog
timer is running after any type of reset and must be turned
off by user software if the application does not use the
watchdog function.
Watchdog Function
The watchdog consists of a programmable prescaler and
the main timer. The prescaler derives its clock from the
TCLK source that also drives timers 0, 1, and 2. The
watchdog timer subsystem consists of a programmable
13-bit prescaler, and an 8-bit main timer. The main timer
is clocked (decremented) by a tap taken from one of the
top 8-bits of the prescaler as shown in Figure 14. The
clock source for the prescaler is the same as TCLK (same
as the clock source for the timers). Thus the main counter
can be docked as often as once every 32 TCLKs (see
Table 5). The watchdog generates an underflow signal
(and is autoloaded from WDL) when the watchdog is at
count 0 and the clock to decrement the watchdog oc-
curs. The watchdog is 8 bits wide and the autoload value
can range from 0 to FFH. (The autoload value of 0 is
permissible since the prescaler is cleared upon autoload).
This leads to the following user design equations. Defini-
tions: t
OSC is the oscillator period, N is the selected
prescaler tap value, W is the main counter autoload value,
P is the prescaler value from Table 5, t
MIN is the mini-
mum watchdog time-out value (when the autoload value
is 0), t
MAX is the maximum time-out value (when the
autoload value is FFH), t
D is the design time-out value.
t
MIN = tOSC x 4 x 32 (W = 0, N = 4)
t
MAX = tOSC x
64 x 4096 x 256 (W =255, N =64)
t
D = tOSC x N x P x (W + 1)
The watchdog timer is not directly loadable by the user.
Instead, the value to be loaded into the main timer is
held in an autoload register. In order to cause the main
timer to be loaded with the appropriate value, a special
sequence of software action must take place. This op-
eration is referred to as feeding the watchdog timer.
To feed the watchdog, two instructions must be sequen-
tially executed successfully. No intervening SFR ac-
cesses are allowed, so interrupts should be disabled
before feeding the watchdog. The instructions should
move A5H to the WFEED1 register and then 5AH to the
WFEED2 register. If WFEED1 is correctly loaded and
WFEED2 is not correctly loaded, then an immediate
watchdog reset will occur. The program sequence to feed
the watchdog timer or cause new WDCON settings to
take effect is as follows:
clr
ea
; disable global interrupts.
Mov.b
wfeed1, #A5h
; do watchdog feed part 1
mov.b
wfeed2, #5Ah
; do watchdog feed part 2
setb
ea
; re-enable global interrupts.
This sequence assumes that the XA interrupt system is
enabled and there is a possibility of an interrupt request
occurring during the feed sequence. If an interrupt was
allowed to be serviced and the service routine contained
any SFR access, it would trigger a watchdog reset. If it
is known that no interrupt could occur during the feed
sequence, the instructions to disable and re-enable in-
terrupts may be removed.
The software must be written so that a feed operation
takes place every t
D seconds from the last feed opera-
tion. Some tradeoffs may need to be made. It is not ad-
visable to include feed operations in minor loops or in
subroutines unless the feed operation is a specific sub-
routine.
To turn the watchdog timer completely off, the following
code sequence should be used:
mov.b
wdcon, #0
; set WD control register to clear
WDRUN.
mov.b
wfeed1 , #A5h
; do watchdog feed part 1
mov.b
wfeed2, #5Ah
; do watchdog feed part 2
This sequence assumes that the watchdog timer is be-
ing turned off at the beginning of initialization code and
that the XA interrupt system has not yet been enabled. If
the watchdog timer is to be turned off at a point when
interrupts may be enabled, instructions to disable and
re-enable interrupts should be added to this sequence.
Watchdog Control Register (WDCON)
The reset values of the WDGON and WDL registers will
be such that the watchdog timer has a timeout period of
4 x 4096 x t
OSC and the watchdog is running. WDCON
can be written by software but the changes only take
effect after executing a valid watchdog feed sequence.
相关PDF资料
PDF描述
MX10EXAUI 16-BIT, FLASH, 30 MHz, MICROCONTROLLER, PQFP44
MX836818 1 TIMER(S), REAL TIME CLOCK, PDIP24
MZ4617RL2 2.4 V, 0.5 W, SILICON, UNIDIRECTIONAL VOLTAGE REGULATOR DIODE, DO-204AH
MZ4616RL2 2.2 V, 0.5 W, SILICON, UNIDIRECTIONAL VOLTAGE REGULATOR DIODE, DO-204AH
MZ4625TA2 5.1 V, 0.5 W, SILICON, UNIDIRECTIONAL VOLTAGE REGULATOR DIODE, DO-204AH
相关代理商/技术参数
参数描述
MX10EXAUC 制造商:MCNIX 制造商全称:Macronix International 功能描述:XA 16-bit Microcontroller Family 64K Flash/2K RAM, Watchdog, 2UARTs
MX10EXAUCG 制造商:MCNIX 制造商全称:Macronix International 功能描述:XA 16-bit Microcontroller Family 64K Flash/2K RAM, Watchdog, 2UARTs
MX10F201FC 制造商:MCNIX 制造商全称:Macronix International 功能描述:High-Performance and Low Power Microcontroller designed for Use Many Applications
MX10FMAXDPC 制造商:MCNIX 制造商全称:Macronix International 功能描述:SINGLE-CHIP 8-BIT MICROCONTROLLER
MX10FMAXDQC 制造商:MCNIX 制造商全称:Macronix International 功能描述:SINGLE-CHIP 8-BIT MICROCONTROLLER