I have a new design that is using both the EPWM for motor-PWMing, but also 4 of the N2HET outputs (to drive both the hi-side and lo-side with symmetric PWMing, which takes 4 pins). This all works, except I am seeing my power-supply collapse occasionally, which suggests shoot-through (both the hi-side and lo-side FETs on at the same time). I'm not sure, but I think it is occurring on PWM-disable, and to disable the 4 N2HET PWM outputs, I am changing each of the 4 pins N2HET instruction (the en_pin_action bit in the control register of the N2HET instruction), so to fully disable the 4 N2HET outputs is taking many CPU cycles (reading the control register and clearing each en_pin_action bit).
Is there an atomic way to disable the 4 N2HET PWM outputs? I am thinking of writing to the hetREG1->Dir register to clear all 4 bits (set as input) in one write, which I am going to test. But I wanted to see if you had a better suggestion.
Thanks,
Jim