TIMER CAPTURE EDGE CAPTURE

This example configures timer TIMG12_0 to measure both the period and duty cycle of a PWM signal.

Timer is configured in Combined pulse width and period mode, Down counting mode with period of 5s. Interrupts is configured to be generated on edge capture and zero event.

This example uses GPIO Output pins to generate PWM pulse. Connections to Timer Capture/Compare pins to GPIO Output pins documented in External Connections.

External Connections

Timer Capture Pin

GPIO Output Pin

PA26

PD7