21.5.3 Event Control

Name: EVCTRL
Offset: 0x04
Reset: 0x00
Property: -

Bit 76543210 
  FILTER EDGE   CAPTEI 
Access R/WR/WR/W 
Reset 000 

Bit 6 – FILTER Input Capture Noise Cancellation Filter

Writing this bit to ‘1’ 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 Count Mode (CNTMODE) bit field in TCBn.CTRLB. “—” means that an event or edge does not affect this mode.

Count ModeEDGEPositive EdgeNegative Edge
Periodic Interrupt mode0
1
Timeout Check mode0Start counterStop counter
1Stop counterStart counter
Input Capture on Event mode0Input Capture, interrupt
1Input Capture, interrupt
Input Capture Frequency Measurement mode0Input Capture, clear and restart counter, interrupt
1Input Capture, clear and restart counter, interrupt
Input Capture Pulse-Width Measurement mode0Clear and restart counterInput Capture, interrupt
1Input Capture, interruptClear and restart counter
Input Capture Frequency and Pulse-Width Measurement mode0
  • On the 1st Positive: Clear and restart counter
  • On the following Negative: Input Capture
  • On the 2nd Positive: Stop counter, interrupt
1
  • On the 1st Negative: Clear and restart counter
  • On the following Positive: Input Capture
  • On the 2nd Negative: Stop counter, interrupt
Single-Shot mode0Start counter
1Start counterStart counter
8-Bit PWM mode0
1

Bit 0 – CAPTEI Capture Event Input Enable

Writing this bit to ‘1’ enables the input capture event.