FILE: ecap_ex2_capture_pwm.c
This example configures ePWM3A for:
- Up count mode
- Period starts at 500 and goes up to 8000
- Toggle output on PRD
eCAP1 is configured to capture the time between rising and falling edge of the ePWM3A output.
External Connections
- eCAP1 is on GPIO16
- ePWM3A is on GPIO4
- Connect GPIO4 to GPIO16.
Watch Variables
- ecap1PassCount - Successful captures.
- ecap1IntCount - Interrupt counts.