Datasheet
166
XMEGA B [DATASHEET]
8291B–AVR–01/2013
13.12.4 CTRLD – Control register D
Bit 7:5 – EVACT[2:0]: Event Action
These bits define the event action the timer will perform on an event according to Table 13-5 on page 166.
The EVSEL setting will decide which event source or sources have control in this case.
Table 13-5. Timer event action selection.
Selecting any of the capture event actions changes the behavior of the CCx registers and related status and control bits
to be used for capture. The error status flag (ERRIF) will indicate a buffer overflow in this configuration. See “Event
Action Controlled Operation” on page 156 for further details.
Bit 4 – EVDLY: Timer Delay Event
When this bit is set, the selected event source is delayed by one peripheral clock cycle. This is intended for 32-bit input
capture operation. Adding the event delay is necessary to compensate for the carry propagation delay when cascading
two counters via the event system.
Bit 3:0 – EVSEL[3:0]:Timer Event Source Select
These bits select the event channel source for the timer/counter. For the selected event channel to have any effect, the
event action bits (EVACT) must be set according to Table 13-6. When the event action is set to a capture operation, the
selected event channel n will be the event channel source for CC channel A, and event channel (n+1)%8, (n+2)%8, and
(n+3)%8 will be the event channel source for CC channel B, C, and D.
Table 13-6. Timer event source selection
Bit 76543210
+0x03 EVACT[2:0] EVDLY EVSEL[3:0]
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Initial Value 0 0 0 0 0 0 0 0
EVACT[2:0] Group Configuration Event Action
000 OFF None
001 CAPT Input capture
010 UPDOWN Externally controlled up/ down count
011 QDEC Quadrature decode
100 RESTART Restart waveform period
101 FRQ Frequency capture
110 PW Pulse width capture
111 Reserved
EVSEL[3:0] Group Configuration Event Source
0000 OFF None
0001 – Reserved
0010 – Reserved
0011 – Reserved