24.5.3 Event Control
Name: | EVCTRL |
Offset: | 0x04 |
Reset: | 0x00 |
Property: | - |
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
FILTER | EDGE | CAPTEI | |||||||
Access | R/W | R/W | R/W | ||||||
Reset | 0 | 0 | 0 |
Bit 6 – FILTER Input Capture Noise Cancellation Filter
Writing a ‘1
’ to this bit enables the Input Capture Noise
Cancellation unit.
Bit 4 – EDGE Event Edge
This bit is used to select the event edge. The effect of this bit is dependent on the selected Timer Mode (CNTMODE) bit field in the Control B (TCBn.CTRLB) register. “—” means an event or edge has no effect in this mode.
Timer Mode | EDGE | Positive Edge | Negative Edge |
---|---|---|---|
Periodic Interrupt mode | 0 | — | — |
1 | — | — | |
Timeout Check mode | 0 | Start counter | Stop counter |
1 | Stop counter | Start counter | |
Input Capture on Event mode | 0 | Input Capture, interrupt | — |
1 | — | Input Capture, interrupt | |
Input Capture Frequency Measurement mode | 0 | Input Capture, clear and restart counter, interrupt | — |
1 | — | Input Capture, clear and restart counter, interrupt | |
Input Capture Pulse-Width Measurement mode | 0 | Clear and restart counter | Input Capture, interrupt |
1 | Input Capture, interrupt | Clear and restart counter | |
Input Capture Frequency and Pulse Width Measurement mode | 0 |
| |
1 |
| ||
Single-Shot mode | 0 | Start counter | — |
1 | Start counter | Start counter | |
8-bit PWM mode | 0 | — | — |
1 | — | — |
Bit 0 – CAPTEI Capture Event Input Enable
Writing a ‘1
’ to this bit enables the input capture event.