Hello everybody,
in a totem pole pfc DPWM1-A drives the upper FET, DPWM1-B drives the lower FET. In positive half cycle of the ac input voltage, DPWM1-B will charge the inductor for the time of its given filter duty. DPWM1-A will operate as an ideal diode at the rest of the DPWM period time. If the capacitor voltage is higher then the input voltage, the current could be negative, when the inductor is completely discharged. This could cause high currents which can destroy my board.
In my circuit now, there is a signal connected to AD06 (ACOMP-F). If its signal underflow an given threshold, the zero current detection should interrupt the active DPWM1-A phase to avoid negativ currents! How do I setup the ACOMP-F to interrupt the current DPWM periode, when the current into the capacitor will run to (or underflow?!) zero?
My current trial code is the following:
// Enable ACOMP-F pin and connect to current limit on DPWM-1 (ZCD - zero current detection)
FaultMuxRegs.DPWM1CLIM.bit.ACOMP_F_EN = 1; // Connect ACOMP-F to DPWM-1 current limit input
FaultMuxRegs.ACOMPCTRL2.bit.ACOMP_F_SEL = 0; // Use threshold register for trip
FaultMuxRegs.ACOMPCTRL2.bit.ACOMP_F_POL = 0; // below thresh to trip
FaultMuxRegs.ACOMPCTRL2.bit.ACOMP_F_THRESH = ZCD_THRESHOLD;
Thanks for your assistance!
Kind regards,
Andy