Hi,
I'm new to using timers and I'd like to do a project that involves analyzing a PWM signal up to 200kHz.
My intended approach is to measure the times of the rising, falling and next rising edges and use that to determine the duty cycle and frequency.
I think the best way to do this is to start two timers (timer_1 and timer_2) on the first rising edge and stop the timer_1 on the falling edge, and stop timer_2 on the next falling edge.
Then I'll read the values of both timers and start them again (or just read them without stopping them since they'll reset anyways)
How do I implement this in the Due? Please provide some explanation of your code, as I'll be having more projects involving stuff like this.
Thanks