MPC563XM Reference Manual, Rev. 1
Freescale Semiconductor
667
Preliminary—Subject to Change Without Notice
Figure 22-35. Double Action Output Compare with FLAG set on both matches
Figure 22-36. DAOC with transfer disabling example
22.5.1.1.7
Pulse/Edge Accumulation (PEA) Mode
The PEA mode returns the time taken to detect a desired number of input events. MODE[6] bit selects
between continuous or single shot operation.
After writing to register A1, the internal counter is cleared on the first input event, ready to start counting
input events and the selected timebase is latched into register B2. On the match between the internal
counter and register A1, a counter bus capture is triggered to register A2 and B2. The data previously held
in register B2 is transferred to register B1 and the FLAG bit is set to indicate that an event has occurred.
The desired time interval can be determined by subtracting register B1 from A2. Registers EMIOSA[n]
and EMIOSB[n] return the values in register A2 and B1, respectively.
selected counter bus
$000500
$001000
$001100
$001000
$001100
A1 value
1
B1 value
2
$xxxxxx $001100
$001100
$001100
$xxxxxx $001000
$001000
$001000
output flip-flop
A1 match
B1 match
Update to
A1 and B1
FLAG pin/register
A1 match
B1 match
Notes: 1. EMIOSA[n] = A1 (when reading)
2. EMIOSB[n] = B1 (when reading)
A2 = A1according to OU[n] bit
B2 = B1according to OU[n] bit
MODE
[6]
= 1
selected counter bus
$0
$2
FLAG set event
A1
value
2
$x
output flip-flop
2. EMIOSA[n] = A1 (when reading)
$0
$2
$1
$2
$0
$1
$1
FLAG pin/register
FLAG clear
EDSEL = 1
System Clock
enabled A1 match
EDPOL = x
B2
value
5
$2
B1
value
4
$x
A2
value
3
$1
OU
1
enabled B1 match
$1
$x
$x
$2
$1
write to A2
$2
$2
$1
$2
$1
$1
$2
write to B2
write to A2
write to B2
write to A2
write to B2
MODE[0]=1
3. EMIOSA[n] = A2 (when writing)
4. EMIOSB[n] = B1 (when reading)
5. EMIOSB[n] = B2 (when writing)
Note: 1. OU[n] bit of EMIOSOUDIS register