Hello, I'm using 28377D's CMPSS module for boost PFC CRM control and finished basic CRM operation.
Basic flows are as follows.
(1) EPWM5 makes 100 kHz interrupt routine. (sensing, voltage control and CMPA update of EPWM1 are done in the routine).
(2) For regulated duty-cycle, the boost switch turns on. (= inductor current goes up)
(3) After switch turn off, inductor current goes to zero.
(4) When analog comparator in CMPSS module detects zero crossing, DCAEVT1.sync in DC submodule of EPWM makes the TBCRT = 0 immediately (which means switch on).
These process repeat.
So, the PFC CRM control was done simply with one regular interrupt routine and CMPSS zero-crossing detection linked to TB submodule.
Here, what I want to do more is also simple.
AT every CMPSS module's rising edge (=which is same timing of DCAEVT1.sync), I just want to toggle one defined variable. For example, make one variable repeat btw 1 and 2.
In this case, do you have any idea to do that thing without adding another interrupt routine or just by using any readable status register?