Enhanced Modular Input/Output Subsystem (eMIOS)
MPC5565 Microcontroller Reference Manual, Rev. 1.0
16-32
Freescale Semiconductor
EMIOS_CCR
n
. 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.
If subsequent input capture events occur while the corresponding FLAG bit is set, registers A2, B1, and
A1 are updated with the latest captured values and the FLAG remains set. Registers EMIOS_CADR
n
and
EMIOS_CBDR
n
return the value in registers A2 and B1, respectively.
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 the
EMIOS_CBDR
n
register. Reading EMIOS_CBDR
n
forces B1 to be updated with A1 register content and
re-enables transfers from B2 to B1, to take effect at the next trailing edge capture. Transfers from B2 to
A1 are not blocked at any time.
The input pulse width is calculated by subtracting the value in B1 from A2.
shows how the unified channel can be used for input pulse-width measurement.
Figure 16-19. Input pulse-width Measurement Example
0x000500
0x001000
0x001100
0x001250
0x001525
0x0016A0
Selected
counter bus
FLAG
set event
B
B
B
Captured A2
value
2
0xxxxxxx
0xxxxxxx
0x001100
0x001525
Notes:
1
After input filter.
2
Reading EMIOS_CADRn returns the value of A2, writing EMIOS_CADRn writes to A2.
Input signal
1
EDPOL = 1
A
A
B1 value
3
0x001525
0x001100
0xxxxxxx
0xxxxxxx
0x001000
0x001250
0x001250
0x001000
0xxxxxxx
0x001000
0x001250
0x0016A0
0x001250
0x001000
Captured B2
value
3
Reading EMIOS_CBDRn returns the value of B1, writing EMIOS_CBDRn writes to B1.
0xxxxxxx
0xxxxxxx
0x001000
0x001250
0x001250
0x001000
A1 value
Summary of Contents for MPC5565
Page 18: ...MPC5565 Microcontroller Reference Manual Devices Supported MPC5565 MPC5565 RM Rev 1 0 09 2007...
Page 34: ...MPC5565 Reference Manual Rev 1 0 Freescale Semiconductor 15...
Page 35: ...MPC5565 Reference Manual Rev 1 0 16 Freescale Semiconductor...
Page 553: ...Flash Memory MPC5565 Microcontroller Reference Manual Rev 1 0 13 38 Freescale Semiconductor...
Page 559: ...SRAM MPC5565 Microcontroller Reference Manual Rev 1 0 14 6 Freescale Semiconductor...
Page 973: ...Preface MPC5565 Microcontroller Reference Manual Rev 1 0 21 36 Freescale Semiconductor...
Page 1153: ...Calibration MPC5565 Microcontroller Reference Manual Rev 1 0 B 8 Freescale Semiconductor...