I want to implement a current controlled chopper using the internal comparator and FlexTimer module for stepper motor control.
I'll explain a simplified version of what I need in order to keep the response focused.
I need two independent PWM channels operating 99% duty cycle. When an internal comparator output goes active, I need the PWM channel to go to the inactive state for the remainder of the present period, returning to the active state at the zero point. I initially thought I could do this by using the Fault signals - however, upon closer inspection it appears that any enabled fault condition will affect both channels. Do I understand this correctly? Is there a way for each channel to be affected by a specific fault signal independently?
If I can't use fault signals, is there some sort of synchronization method I can use? Perhaps using the comparator outputs as hardware triggers to affect a change of the output mask, and then calling an ISR before the zero point in order to restore the output mask synchronously at the zero point? However, I would prefer a hardware solution to this instead of using ISRs.