Enhanced Modular I/O Subsystem (eMIOS200)
MPC5510 Microcontroller Family Reference Manual, Rev. 1
26-20
Freescale Semiconductor
Preliminary
Figure 26-14. SAOC Example — EDPOL value being transferred to the output flip-flop
Figure 26-15. SAOC Example —Toggling the Output Flip-Flop
26.5.1.1.4
Input Pulse-Width Measurement (IPWM) Mode
The IPWM mode allows the measurement of the width of a positive or negative pulse by capturing the
leading edge on register B1 and the trailing edge on register A2. Successive captures are done on
consecutive edges of opposite polarity. The leading edge sensitivity (i.e., pulse polarity) is selected by
EDPOL bit in the EMIOS_CCR[n] register. Registers EMIOS_CADR[n] and EMIOS_CBDR[n] return
the values in register A2 and B1, respectively.
The capture function of register A2 remains disabled until the first leading edge triggers the first input
capture on register B2. When this leading edge is detected, the count value of the selected time base is
latched into register B2; the FLAG bit is not set. When the trailing edge is detected, the count value of the
selected time base is latched into register A2 and, at the same time, the FLAG bit is set and the content of
register B2 is transferred to register B1 and to register A1.
If subsequent input capture events occur while the corresponding FLAG bit is set, registers A2, B1, and
A1 will be updated with the latest captured values and the FLAG will remain set. Registers
EMIOS_CADR[n] and EMIOS_CBDR[n] return the value in registers A2 and B1, respectively.
In order to guarantee coherent access, reading EMIOS_CADR[n] forces B1 to be updated with the content
of register A1. At the same time transfers between B2 and B1 are disabled until the next read of
Selected
Counter Bus
FLAG
Set Event
A1 Match
A1 Match
A1 Match
0xxxxxxx 0x001000
0x001000
0x001000
Notes:
1
0x000500
0x001000
0x001100
0x001000
0x001100
0x001000
EMIOS_CADR[n] = A2
A2 = A1 according to OU[n] bit
Update to
A1
EDSEL = 0
Output
Flip-Flop
EDPOL = 1
A1 Value
1
0x001000
Selected
Counter Bus
FLAG
Set Event
A1 Match
A1 Match
A1 Match
0xxxxxxx 0x001000
0x001000
0x001000
Note:
1
0x000500
0x001000
0x001100
0x001000
0x001100
0x001000
EMIOS_CADR[n] = A2
Update to
A1
EDSEL = 1
Output
Flip-Flop
EDPOL = x
A1 Value
1
0x001000