Basic example showing how to use the GPT to measure Period and Duty of the same input capture pin
Written and tested on S5D9_PK, SSP1.5.3
The code can be easily ported to any Synergy device with GPT
Input capture is performed by GPT0 - GTIOCA - P512
GPT11 is used to generate a test PWM output signal on GTIOCA - P500
Connect the 2 pins to demonstrate!
Use S5 and S4 to vary the PWM duty