BAT32G1x9 user manual | Chapter 12 15-bit interval timer
466 / 1149
Rev.1.02
12.3.3
Control Register (ITMC) for 15-bit interval timers
This is the register that sets the start and stop of the run of the 15-bit interval timer and the comparison
value. Set the ITMC registers with 16-bit memory operation instructions. After generating a reset signal, the
value of this register becomes "7FFFH".
Figure 12-4 Format of the 15-bit interval timer control register (ITMC).
Address: 0x40044F50
After reset:
7FFFH R/W
symbol
15
14
~
0
ITMC
RINTE
1 5-bit interval timer for operational control
0
Stops the counter from running (clear count).
1
Start the run of the counter.
ITCMP14
~
ITCMP0
The 15-bit interval timer compares the setting of the value
0001H
These bits produce a
×
fixed-cycle interrupt that counts clock cycles (ITCMP
setting value +1).
•
•
•
7FFFH
0,000H
Prohibit settings.
Example of an interrupt cycle when ITCMP1 4 ~ ITCMP0 is "0 001H" or "7FFFH"
• ITCMP14
~
ITCMP0 = 0001H
,
counting clock: f
SUB
=32.768kHz
1/32.768[kHz] (1+1) =0.06103515625[ms]
×
≈ 61.03[us]
• ITCMP14
~
ITCMP0 = 7FFFH
,
counting clock: f
SUB
=32.768kHz
1/32.768[kHz] (
×
32767+1) = 1000[ms]
note
1. To
change
the RINTE bit from "1" to "0", it must be
rewritten after
the INTIT is set to disable interrupt processing
through the interrupt mask flag register. To restart the run (from "0" to "1"),
you must set it to allow interrupt
processing after the ITIF flag is cleared.
2. The read value of the RINTE bit is
reflected after
1
count clock after the
RINTE bit is set.
3. After moving from
sleep
mode to normal operating mode, if you want to set the ITMC register and move to
sleep
mode
again, you must confirm that the write value of the ITMC register is reflected or set the ITMC
Registers pass through at
least 1 count clock before moving to sleep mode.
4. To change the
settings for
ITCMP14~ITCMP0 bits, you must
do so in a state where the
RINTE bit is "0".
However, it is possible to change the ITCMP14
~
at the same time as changing
the
RINTE bit
from "
0
" to "
1
"
or from "1"
to "0" ITCMP0 bit settings.
RINTE
ITCMP14
~
ITCMP0