- I need a 2KHz complimentary PWM waves with adjustable duty and phase that is triggered by an external 4KHz source.
- After reading the datasheet I think there might be 2 way to do this:
Use a TC unit in capture mode, and somehow generate an interrupt when the count reaches 2. Use another TC unit in waveform mode to output phase-correct PWM. Use yet another TC unit to implement dead-time and generate the complimentary PWM.
Use the PWM controller, which already have complimentary PWM with dead-time build-in, but I'm not sure if it accepts external trigger.
If either of them is possible, could you please provide and example code ?
Thanks in advance !