230
32117D–AVR-01/12
AT32UC3C
14.6.2
Event Shaper (EVS) Operation
PEVC contains Event Shapers (EVS) for certain types of generators:
Asynchronous generators and/or external input
General-purpose waveforms like timer outputs or Generic Clocks
Each Event Shaper is responsible of shaping one input, prior to going through a PEVC channel:
Synchronize asynchronous external inputs
Apply any additional glich-filtering
Detect rise, fall, or both edges of the incoming signal
14.6.2.1
Input Glitch Filter (IGF)
Input Glitch Filtering can be turned on or off by writing to the Input Glitch Filter (IGF) field of the
corresponding Event Shaper Register (EVS).
When IGF is on, the incoming event is sampled periodically. The sampling clock is divided from
CLK_RCSYS by the value of the Input Glitch Filter Divider Register (IGFDR). IGF will filter out
spikes and propagate only incoming events that respect one of the following two conditions :
rise event : 2 samples low, followed by 0+ changes, followed by 2 samples high
fall event : 2 samples high, followed by 0+ changes, followed by 2 samples low
Both CLK_RCSYS and CLK_PEVC must be enabled to use Input Glitch Filtering.
14.6.3
Event Propagation Latency
Once a channel is setup, incoming peripheral events are relayed by hardware. Event progation
latency is therefore cycle deterministic. However, its value depends on the exact settings that
apply to a given channel.
When the channel multiplexer CHMXn.EVMX selects a generator without Event Shaper, event
propagation latency is 0 cycle. Software event is a particular case of 0 cycle propagation.
When the channel multiplexer CHMXn.EVMX selects a generator with Event Shaper, event
propagation latency depends on Input Glitch Filter setting EVSm.IGF :
IGF off : event propagation latency is lesser or equal to 2 CLK_PEVC cycles
IGF on : event propagation latency is lesser or equal to 3 * 2IGFDR+1 * CLK_RCSYS cycles
Please refer to the Module Configuration section at the end of this chapter for the list of genera-
tors implementing Event Shapers.
Table 14-2.
Event Propagation Latency
Generator
CHMXn.EVMX
Input Glitch Filter
EVSm.IGF
Latency
Clock
Generator without Event Shaper
-
0
-
Software event
-
0
-
Generator with Event Shaper
Off
2
CLK_PEVC
Generator with Event Shaper
On
3 * 2IGFDR+1
CLK_RCSYS