Enhanced Modular Input/Output Subsystem (eMIOS)
MPC5565 Microcontroller Reference Manual, Rev. 1.0
16-34
Freescale Semiconductor
When the first edge of selected polarity is detected, the selected time base is latched into the registers A2
and B2, and the data previously held in register B2 is transferred to register B1. On this first capture the
FLAG line is not set, and the values in registers B1 is meaningless. On the second and subsequent captures,
the FLAG line is set and data in register B2 is transferred to register B1.
When the second edge of the same polarity is detected, the counter bus value is latched into registers A2
and B2, the data previously held in register B2 is transferred to data register B1 and to register A1. The
FLAG bit is set to indicate that the start and end points of a complete period have been captured. This
sequence of events is repeated for each subsequent capture. Registers EMIOS_CADR
n
and
EMIOS_CBDR
n
return the values in register A2 and B1, respectively.
To allow coherent data, reading EMIOS_CADR
n
forces A1 content to be transferred to the B1 register and
disables transfers between B2 and B1. These transfers are disabled until the next read of the
EMIOS_CBDR
n
register. Reading EMIOS_CBDR
n
forces A1 content to be transferred to B1 and
re-enables transfers from B2 to B1, to take effect at the next edge capture.
The input pulse period is calculated by subtracting the value in B1 from A2.
shows how the unified channel can be used for input period measurement.
Figure 16-21. Input Period Measurement Example
0x000500
0x001000
0x001100
0x001250
0x001525
0x0016A0
Selected
counter bus
FLAG
set event
A
A
A
Captured A2
value
2
0xxxxxxx
0x001000
0x001250
0x0016A0
Notes:
1
After input filter.
2
Reading EMIOS_CADRn returns the value of A2.
Input signal
1
EDPOL = 1
B1 value
3
0xxxxxxx
0xxxxxxx
0x001000
0x001250
0xxxxxxx
0x001000
0x001250
0x0016A0
Captured B2
value
3
Reading EMIOS_CBDRn returns the value of B1.
0xxxxxxx
0xxxxxxx
0x001000
0x001250
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...