Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: C2000WARE
Hello all.
After advancing from my previous problem to get a GPIO to trigger a TZ1 one shot event, I’ve ran into a new one when configuring the CMPSS to do something similar.
I have found that the comparator, even with some hysteresis added, seems to struggle substantially with what seems to be a noisy input. The comparator can generate multiple trips within a single switching period, causing unstable PWM output signals to be present. This is less than ideal for our application.
It would be good if there was a way to synchronise the trip zones, comparator, digital compare or even all of these to the PWM signal frequency rather than to the time base clock which is substantially higher. This would ensure that a trip signal is only generated (or not) once within a single TBPRD. Is something of the sort possible either directly or through software interrupt modifications?
Also less than ideal is the fact that, when my GPIO goes high to enable PWM output, or a comparator is deasserted, the first switching period could have duty cycles that are substantially less than 50%. This causes substantial issues in our application which requires 50% duty cycle at all times.
Is there similarly a way to deal with this problem? It would be very good if we could ensure something like the following:
Trip signal generated. Allow the current cycle to finish but stop all following PWM generation until comparator deasserted.
If a trip signal is deasserted, do not allow a current cycle to start until the PWM switching period that was being generated at the instant the trip was deasserted was still asserted at the start of a switching period.
Is there a way to have these two functionalities within the code? For a cycle by cycle trip, this may be more difficult, but we would probably look to “skip” X number or cycles following a cycle by cycle trip in a sort of “hiccup” mode. We could probably set this as a further OSHT mode with an interrupt that only clears the flag once N number of switching periods have been blanked. It would be important that the other points above regarding 50% duty cycle would be present in this functionality, too.
I understand this may be a bit advanced for what the PWM generator is capable of in its basic configuration but some pointers would be appreciated to how it could otherwise be done in hardware.
Best regards,
JMH

