Cascaded Operation; Figure 12.21 Cascaded Operation Setting Procedure; Table 12.18 Cascaded Combinations - Renesas H8S/2437 Hardware Manual

Renesas 16-bit single-chip microcomputer h8s family / h8s / 2600 series
Table of Contents

Advertisement

12.5.4

Cascaded Operation

In cascaded operation, two 16-bit counters for different channels are used together as a 32-bit
counter.
This function works by counting the channel 1 counter clock at overflow/underflow of TCNT_2 as
set in bits TPSC2 to TPSC0 in TCR.
Underflow occurs only when the lower 16-bit TCNT is in phase counting mode.
Table 12.18 shows the register combinations used in cascaded operation.
Note: When phase counting mode is set for channel 1, the counter clock setting is invalid and the
counter operates independently in phase counting mode.

Table 12.18 Cascaded Combinations

Combination
Channels 1 and 2
Example of Cascaded Operation Setting Procedure:
Figure 12.21 shows an example of the setting procedure for cascaded operation.
Cascaded operation
<Cascaded operation>
Examples of Cascaded Operation:
Figure 12.22 illustrates the operation when counting upon TCNT_2 overflow/underflow has been
set for TCNT_1, TGRA_1 and TGRA_2 have been designated as input capture registers, and the
TIOC pin rising edge has been selected.
When a rising edge is input to the TIOCA1 and TIOCA2 pins simultaneously, the upper 16 bits of
the 32-bit data are transferred to TGRA_1, and the lower 16 bits to TGRA_2.
Upper 16 Bits
TCNT_1
[1]
Set cascading
Start counting
[2]

Figure 12.21 Cascaded Operation Setting Procedure

Lower 16 Bits
TCNT_2
[1]
Set bits TPSC2 to TPSC0 in the channel 1 TCR
to B'111 to select TCNT_2 overflow/underflow
counting.
[2]
Set the CST bit in TSTR for the upper and lower
channel to 1 to start the count operation.
Rev. 1.00, 09/03, page 337 of 704

Advertisement

Table of Contents
loading

Table of Contents