22.5.6 Events
The TC can generate the following events:
| Generator Name | Description | Event Type | Generating Clock Domain | Length of Event | |
|---|---|---|---|---|---|
| Peripheral | Event | ||||
| TCn | OVF | Overflow or Underflow | Pulse | GCLK_TCn | One GCLK_TCn period |
| MC_n | Compare Match or Capture on compare/capture channel n | Pulse | GCLK_TCn | One GCLK_TCn period | |
Writing a ‘1’ to an Event Output Enable bit in the Event Control Register
(EVCTRL.xxEO) enables the corresponding output event. Writing a ‘0’ to this
bit disables the corresponding output event.
The TC can connect to the following events:
| User Name | Description | Input Detection | Channel Path Type | |
|---|---|---|---|---|
| Peripheral | Input | |||
| TCn | EVU | Event Input | Level |
Asynchronous |
Writing a ‘1’ to an Event Input Enable bit in the Event Control register
(EVCTRL.xxEI) enables the corresponding action on input event. Writing a ‘0’
to this bit disables the corresponding action on input event.
The event users can trigger the following actions:
| Event Input | Event Action | Description |
|---|---|---|
| EVU | RETRIGGER | Counter retrigger |
| COUNT | Count on event (increment or decrement, depending on counter direction) | |
| START | Counter start - Start counting on the event rising edge. Further events will not restart the counter; the counter will keep on counting using prescaled GCLK_TCn, until it reaches TOP or ZERO, depending on the direction. | |
| STAMP | Capture Time-stamp (overflow) | |
| PPW | Period and pulse width capture. The period is captured in CC0, and the pulse width is captured in CC1. | |
| PWP | Pulse width and period capture. The period is captured in CC1, and the pulse width is captured in CC0. | |
| PW | Pulse width capture |
Refer to the EVSYS - Event System chapter for details on configuring the event system.
