HT45R22E Holtek Semiconductor, HT45R22E Datasheet - Page 25

no-image

HT45R22E

Manufacturer Part Number
HT45R22E
Description
Remote Type 8-bit OTP MCU
Manufacturer
Holtek Semiconductor
Datasheet
No matter what the source of the wake-up event is, once
a wake-up event occurs, there will be a time delay be-
fore normal program execution resumes. Consult the ta-
ble for the related time.
Note:
Watchdog Timer
The Watchdog Timer, also known as the WDT, is pro-
vided to inhibit program malfunctions caused by the pro-
gram jumping to unknown locations due to certain
uncontrollable external events such as electrical noise.
Watchdog Timer Operation
It operates by providing a device reset when the Watch-
dog Timer counter overflows. Note that if the Watchdog
Timer function is not enabled, then any instructions re-
lated to the Watchdog Timer will result in no operation.
Setting up the various Watchdog Timer options are con-
trolled via the configuration options and two internal reg-
isters WDTS and CTRL1. Enabling the Watchdog Timer
can be controlled by both a configuration option and the
WDTEN bits in the CTRL1 internal register in the Data
Memory.
The Watchdog Timer will be disabled if bits WDTEN3~
WDTEN0 in the CTRL1 register are written with the bi-
nary value 1010B and WDT configuration option is dis-
able. This will be the condition when the device is
Rev. 1.00
External RES
PA, PC Port
Interrupt
WDT Overflow
Configuration
Wake-up
Source
Disable
Disable
Option
Enable
1. t
2. t
3. t
4. t
Watchdog Timer On/Off Control
SYS
RSTD
SST1
SST2
(system clock)
= 2 or 1024 t
= 1024 t
is power-on delay, typical time=100ms
Wake-up Delay Time
t
RSDT
ERC, IRC
Register
Disable
SYS
CTRL1
Enable
t
SST1
+ t
x
SYS
Oscillator Type
SST1
t
RSDT
Function
Crystal
t
WDT
OFF
SST2
ON
ON
+ t
SST2
25
powered up. Although any other data written to
WDTEN3~WDTEN0 will ensure that the Watchdog
Timer is enabled, for maximum protection it is recom-
mended that the value 0101B is written to these bits.
The Watchdog Timer clock can emanate from three dif-
ferent sources, selected by configuration option. These
are LXT, f
the system enters the Idle/Sleep Mode the instruction
clock is stopped, therefore if the configuration options
have selected f
source, the Watchdog Timer will cease to function. For
systems that operate in noisy environments, using the
LIRC or the LXT as the clock source is therefore the rec-
ommended choice. The division ratio of the prescaler is
determined by bits 0, 1 and 2 of the WDTS register,
known as WS0, WS1 and WS2. If the Watchdog Timer in-
ternal clock source is selected and with the WS0, WS1
and WS2 bits of the WDTS register all set high, the
prescaler division ratio will be 1:128, which will give a
maximum time-out period.
Under normal program operation, a Watchdog Timer
time-out will initialise a device reset and set the status bit
TO. However, if the system is in the Idle/Sleep Mode,
when a Watchdog Timer time-out occurs, the device will
be woken up, the TO bit in the status register will be set
and only the Program Counter and Stack Pointer will be
reset. Three methods can be adopted to clear the con-
tents of the Watchdog Timer. The first is an external
hardware reset, which means a low level on the external
reset pin, the second is using the Clear Watchdog Timer
software instructions and the third is when a HALT in-
struction is executed. There are two methods of using
software instructions to clear the Watchdog Timer, one
of which must be chosen by configuration option. The
first option is to use the single CLR WDT instruction
while the second is to use the two commands CLR
WDT1 and CLR WDT2 . For the first option, a simple
execution of CLR WDT will clear the Watchdog Timer
while for the second option, both CLR WDT1 and
clear the Watchdog Timer. Note that for this second op-
tion, if CLR WDT1 is used to clear the Watchdog
Timer, successive executions of this instruction will have
no effect, only the execution of a CLR WDT2 instruc-
tion will clear the Watchdog Timer. Similarly after the
cessive CLR WDT1 instruction can clear the Watch-
dog Timer.
CLR WDT2 must both be executed to successfully
CLR WDT2 instruction has been executed, only a suc-
SYS
/4, or LIRC. It is important to note that when
SYS
/4 as the Watchdog Timer clock
HT45R22E
March 17, 2010
www.DataSheet4U.com

Related parts for HT45R22E