Enhanced Modular Input/Output Subsystem (eMIOS)
MPC5565 Microcontroller Reference Manual, Rev. 1.0
16-40
Freescale Semiconductor
internal counter is disabled and its content is transferred to register A2. At the same time the FLAG bit is
set. Reading registers EMIOS_ALTA
n
or A2 returns the amount of detected pulses.
For continuous operation (MODE[6] cleared), the next match between comparator A and the selected time
base clears the internal counter and counting is enabled again. To guarantee the accuracy when reading
EMIOS_CCNTR
n
after the flag is set, the software must check if the time base value is out of the time
interval defined by registers A1 and B1. Alternatively register A2 always holds the latest available
measurement providing coherent data at any time after the first FLAG occurs. This register is addressed
by the alternate address EMIOS_ALTA
n
.
For single shot operation (MODE[6] set), the next match between comparator A and the selected time base
has no effect, until a new write to register A is performed. The EMIOS_CCNTR
n
content is also
transferred to register A2 when a match in the B comparator occurs.
NOTE
The FORCMA and FORCMB bits have no effect when the unified channel
is configured for PEC mode.
show how the unified channel can be used for continuous or single shot
pulse/edge counting mode.
Figure 16-27. Pulse/Edge Counting Continuous Mode Example
Selected
counter bus
0x000090 0x000090
B1 value
2
0x000090
0x000303
0x000303
0x000303
Amount of
EMIOS_CCNTR
n
FLAG
set event
MODE[6] = 0
A1 match
B1 match
B1 match
A1 value
1
Notes:
1
Writing EMIOS_CADR
n
writes to A1.
2
Writing EMIOS_CBDR
n
writes to B1.
Time
0x000000
events
detected
A1 match
A1 and B1
Write
0x000090
0x000303
0x000090
0x000303
A2 value
3
3
Reading EMIOS_ALTA
n
returns the value of A2.
A2 EMIOS_CCNTR
n
A2 EMIOS_CCNTR
n
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...