Datasheet

In this mode, it is possible to clear only the CH(n+1)F bit. Therefore, when the CH(n+1)F
bit is set again, the latest captured values are available in C(n)VH:L and C(n+1)VH:L
registers.
For a new sequence of the measurements in the dual edge capture – continuous mode, it
is recommended to clear the CH(n)F and CH(n+1) bits to start new measurements.
12.4.21.3 Pulse width measurement
If the channel (n) is configured to capture rising edges (ELS(n)B:ELS(n)A = 0:1) and the
channel (n+1) to capture falling edges (ELS(n+1)B:ELS(n+1)A = 1:0), then the positive
polarity pulse width is measured. If the channel (n) is configured to capture falling edges
(ELS(n)B:ELS(n)A = 1:0) and the channel (n+1) to capture rising edges (ELS(n
+1)B:ELS(n+1)A = 0:1), then the negative polarity pulse width is measured.
The pulse width measurement can be made in one-shot capture mode (One-shot capture
mode) or continuous capture mode (Continuous capture mode).
The following figure shows an example of the dual edge capture – one-shot mode used to
measure the positive polarity pulse width. The DECAPEN bit selects the dual edge
capture mode. The DECAP bit is set to enable the measurement of next positive polarity
pulse width. The CH(n)F bit is set when the first edge of this pulse is detected, that is, the
edge selected by ELS(n)B:ELS(n)A bits. The CH(n+1)F bit is set and DECAP bit is
cleared when the second edge of this pulse is detected, that is, the edge selected by ELS(n
+1)B:ELS(n+1)A bits. Both DECAP and CH(n+1)F bits indicate when two edges of the
pulse were captured and the C(n)VH:L and C(n+1)VH:L registers are ready for reading.
Functional Description
MC9S08PA60 Reference Manual, Rev. 1, 9/2012
374 Freescale Semiconductor, Inc.