I am trying to trigger a PWM from an external clock on a TMS570LS1227. I have the trigger on TZ1 and set up a digital compare event to trigger a sync on the PWM. Works great; it never loses sync. The problem is that the external trigger can stop and start, but the PWM keeps running and the PWM is triggering ADC SOCs. So, I get a bunch of unsynced samples that I perform calculations with. I'm looking for ideas for how can I stop the PWM when I am not receiving an external clock (meaning the clock is a constant low logic). Loading and unloading TBPRD from an interrupt generated by a compare event is a possibility but I'm wondering if there are any better suggestions out there.
