21.3.4 Events
Generator Name | Description | Event Type | Generating Clock Domain | Length of Event | |
---|---|---|---|---|---|
Peripheral | Event | ||||
TCAn | OVF_LUNF |
Normal mode: Overflow Split mode: Low byte timer underflow | Pulse | CLK_PER | One CLK_PER period |
HUNF |
Normal mode: Not available Split mode: High byte timer underflow | Pulse | CLK_PER | One CLK_PER period | |
CMP0_LCMP0 |
Normal mode: Compare Channel 0 match Split mode: Low byte timer Compare Channel 0 match | Pulse | CLK_PER | One CLK_PER period | |
CMP1_LCMP1 |
Normal mode: Compare Channel 1 match Split mode: Low byte timer Compare Channel 1 match | Pulse | CLK_PER | One CLK_PER period | |
CMP2_LCMP2 |
Normal mode: Compare Channel 2 match Split mode: Low byte timer Compare Channel 2 match | Pulse | CLK_PER | One CLK_PER period |
User Name | Description | Input Detection | Async/Sync | |
---|---|---|---|---|
Peripheral | Input | |||
TCAn | CNTA | Count on a positive event edge | Edge | Sync |
Count on any event edge | Edge | Sync | ||
Count while the event signal is high | Level | Sync | ||
The event level controls the count direction, up when low and down when high | Level | Sync | ||
CNTB | The event level controls count direction, up when low and down when high | Level | Sync | |
Restart counter on a positive event edge | Edge | Sync | ||
Restart counter on any event edge | Edge | Sync | ||
Restart counter while the event signal is high | Level | Sync |
The specific actions described in the table above are selected by writing to
the Event Action (EVACTA, EVACTB) bits in the Event Control (TCAn.EVCTRL) register. Input
events are enabled by writing a ‘1
’ to the Enable Counter Event Input
(CNTAEI and CNTBEI) bits in the TCAn.EVCTRL register.
If both EVACTA and EVACTB are configured to control the count direction, the event signals will be OR’ed to determine the count direction. Both event inputs must then be low for the counter to count upwards.
- Event inputs are not used in Split mode.
- Event actions with level input detection only work reliably if the event frequency is less than the timer’s frequency.
Refer to the Event System (EVSYS) section for more details regarding event types and Event System configuration.