Bei dir:
Laut Datenblatt:PORTD.PIN2CTRL = PORT_ISC_FALLING_gc;
mfgPulse Width Capture
Selecting the pulse width measure event action makes the enabled compare channel perform the input capture action on
falling edge events and the restart action on rising edge events. The counter will then restart on positive edge events,
and the input capture will be performed on the negative edge event. The event source must be an I/O pin, and the sense configuration for the pin must be set to generate an event on both edges. Figure 14-13 on page 159 shows and example
where the pulse width is measured twice for an external signal.
Lesezeichen