Datasheet

Table Of Contents
Section 10 16-Bit Timer Pulse Unit (TPU)
REJ09B0140-0900 Rev. 9.00 Page 321 of 846
Sep 16, 2010
H8S/2215 Group
When TGR is an output compare register
When a compare match occurs, the value in the buffer register for the corresponding channel is
transferred to the timer general register. This operation is illustrated in figure 10.16.
Buffer register
Timer general
register
TCNTComparator
Compare match signal
Figure 10.16 Compare Match Buffer Operation
When TGR is an input capture register
When input capture occurs, the value in TCNT is transferred to TGR and the value previously
held in the timer general register is transferred to the buffer register. This operation is
illustrated in figure 10.17.
Buffer register
Timer general
register
TCNT
Input capture
signal
Figure 10.17 Input Capture Buffer Operation
Example of Buffer Operation Setting Procedure: Figure 10.18 shows an example of the buffer
operation setting procedure.
Buffer operation
Select TGR function
Set buffer operation
Start count
<Buffer operation>
[1]
[2]
[3]
[1]
[2]
[3]
Designate TGR as an input capture register or
output compare register by means of TIOR.
Designate TGR for buffer operation with bits
BFA and BFB in TMDR.
Set the CST bit in TSTR to 1 start the count
operation.
Figure 10.18 Example of Buffer Operation Setting Procedure