EasyManua.ls Logo

NXP Semiconductors MPC5566 - Page 711

NXP Semiconductors MPC5566
1268 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Enhanced Modular Input/Output Subsystem (eMIOS)
MPC5566 Microcontroller Reference Manual, Rev. 2
17-32 Freescale Semiconductor
EMIOS_CCRn. Registers EMIOS_CADRn and EMIOS_CBDRn 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_CADRn and
EMIOS_CBDRn return the value in registers A2 and B1, respectively.
To guarantee coherent access, reading EMIOS_CADRn 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_CBDRn register. Reading EMIOS_CBDRn 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.
Figure 17-19 shows how the unified channel can be used for input pulse-width measurement.
Figure 17-19. Input pulse-width Measurement Example
0x000500 0x001000 0x001100 0x001250 0x001525 0x0016A0
Selected
counter bus
FLAG
set event
BBB
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
0x0015250x001100
0xxxxxxx 0xxxxxxx 0x001000 0x0012500x0012500x001000
0xxxxxxx 0x001000 0x001250 0x0016A00x0012500x001000
Captured B2
value
3
Reading EMIOS_CBDRn returns the value of B1, writing EMIOS_CBDRn writes to B1.
0xxxxxxx 0xxxxxxx 0x001000 0x0012500x0012500x001000A1 value

Table of Contents

Related product manuals