![](http://datasheet.mmic.net.cn/Freescale-Semiconductor/MC68F375MZP33R2_datasheet_98733/MC68F375MZP33R2_484.png)
MC68F375
CONFIGURABLE TIMER MODULE (CTM9)
MOTOROLA
REFERENCE MANUAL
Rev. 25 June 03
13-58
of not missing samples by insuring that the interrupt response time is faster than the
fastest input period. Alternately, when the software is just interested in the latest period
measurement, one 32-bit coherent read instruction can get both the current and the
previous samples. Depending on the prescaler divide ratio, period times can be mea-
sured from 0.119 microseconds to 3 seconds.
Figure 13-17 shows a counter submodule and a DASM combination as an example
of period measurement. The software designates whether the rising or falling edge of
the input signal is to be used for the measurements. When the edge is detected, the
state of the time-base bus is stored in register A, and the content of register B1 is trans-
ferred into register B2. After register B2 is safely latched, the content of register A is
transferred to register B1. This procedure gives the software coherent current and pre-
vious samples in registers A and B2 at all times. An interrupt is available for the cases
where the software needs to be aware of each new sample. Note that a software
option is provided to also generate an interrupt after the first edge.
Figure 13-17 CTM9 Example — Double Capture Period Measurement
13.11.4 CTM9 Single Output Compare
To create one output edge, the software can use an SASM channel. The software pro-
vides a compare value in a register and the SASM compares that value to the
incrementing value seen on one of the time-base buses. When a comparison is
detected, the state of the output pin is changed.
The example shown in Figure 13-18 uses a counter submodule with one channel of
an SASM to create an output signal. The software can read the current state of the
counter submodule. That, or some other criteria, is used to determine the time-base
16-Bit Up Counter
Submodule Bus
Clock
Select
16-Bit Register B1
Edge
Detect
Input
Pin
16-Bit Register B2
Input
Capture
Double Action Submodule
Interrupt
on
From
Prescaler
or Pin
Designated
Bus
Select
Bus
Select
Two
16-Bit
Time-
Base
Buses
Edge
16-Bit Register A
Modulus Counter Submodule
Free-Running or
Free-Running or
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.