Hey folks,
I am currently trying to generate a PWM signal using the ECAP as an interrupt timer signal.
I have found the following code which I am trying to adapt:
gist.github.com/.../6aa3d90fa7cfc6df06118360b67b48da
The problem here is that in the while statement (in the function wait_for_pwm_timer()) it waits for an interrupt which should arrive on bit 31 in register __R31, which should actually be generated by the ECAP. But it never arrives.
Why is the interrupt never fired, is a configuration of a register missing?
Many thanks!