14. Functions
RX8130CE
Jump to
ETM50E-07
Seiko Epson Corporation
26
14.2. Wakeup Timer Interrupt Function
The wakeup timer interrupt function generates an interrupt event periodically at any wakeup set between
244.14
s
and 65535 hours
. This function can stop at one time and is available as an accumulative timer.
After the interrupt occurs, the /IRQ status is automatically cleared .
14.2.1. Related registers for function of wakeup timer interrupt function
Address
h
Function
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
1A
Timer Counter 0
128
64
32
16
8
4
2
1
1B
Timer Counter 1
32768 16384
8192
4096
2048
1024
512
256
1C
Extension Register
FSEL1 FSEL0
USEL
TE
WADA
TSEL2 TSEL1 TSEL0
1D
Flag Register
VBLF
0
UF
TF
AF
RSF
VLF
VBFF
1E
Control Register0
TEST
STOP
UIE
TIE
AIE
TSTP TBKON TBKE
Before entering operation settings, we recommend
first clearing the TE bit to "0"
.
When the wakeup timer
function is not being used, the wakeup Timer Counter0,1 register can be used as a
RAM register. In such cases, stop the wakeup timer function by writing "0" to the TE and TIE bits.
1) Down counter for wakeup timer
(
Timer Counter 1, 0
)
This register is used to set the default (preset) value for the counter. Any count value from 1
(0001
h)
to
65535
(FFFFh)
can be set.
Be sure to write "0" to the TE bit before writing the preset value.
When TE=0, read out data of timer counter is
default (Preset) value. And when TE=1, read out data of
timer counter is just counting value. But, when access to timer counter data, counting value is not held.
Therefore, for example, perform twice read access to obtain right data, and a way to adopt the case that
two data accorded is necessary.
2) TSEL2, TSEL1, TESL0 bit
The combination of these three bits is used to set the countdown period (source clock) for this function.
Table 16 Countdown period (source clock) selection
TSEL2
( bit 2 )
TSEL1
( bit 1 )
TSEL0
( bit 0 )
Source clock
Auto reset time
tRTN (min)
0
0
0
4096
Hz
/Once per 244.14
s
122
s
0
0
1
64
Hz
/Once per 15.625 ms
7.57
ms
0
1
0
1
Hz
/Once per second
7.57
ms
0
1
1
1/60
Hz
/Once per minute
7.57
ms
1
0
0
1/3600 Hz /Once per hour
7.57
ms
1) The /IRQ pin's auto reset time (tRTN) varies as shown above according to the source clock setting.
2)
The first countdown shortens than a source clock.
When selected 4,096 Hz / 64 Hz / 1Hz as a source clock, one period of error occurs at the maximum.
When selected1/60 Hz / 1/3600 Hz as a source clock, 1 Hz of error occurs at the maximum.