Hi All
I have a Piccolo 28035 running and want to use it to control a BLDC motor. The problem I am having is that I cannot turn one channel of the PWM (say epwm1a and pwm1b) off within one cycle. I want both epwm1a and epwm1b to go low when the motor commutates, but so far I cannot get it to turn off within one pwm cycle.
I have my DBCTL set as active high complemetary:
EPwm1Regs.DBCTL.bit.OUT_MODE = DB_FULL_ENABLE; // enable Dead-band module
EPwm1Regs.DBCTL.bit.IN_MODE = 0; //DB_FULL_ENABLE;
EPwm1Regs.DBCTL.bit.POLSEL = DB_ACTV_HIC; // Active Hi complementary
Now if I use the commands:
EPwm1Regs.AQCSFRC.bit.CSFA=1;
EPwm1Regs.AQCSFRC.bit.CSFB=1;
to force both low, then only one goes low and the other stays high. I assume this is because of the DBCTL settings. However, if I change the DBCTL settings, the dsp takes about 50ms to change from one setting to another, during which time pwm1a is high and pwm1b low (or vice versa depending on how I change it).
I have the same probem when using this command:
EPwm1Regs.AQCSFRC.bit.CSFA=1; and
EPwm1Regs.AQCSFRC.bit.CSFB=1;
Then I still need to change the DBCTL register which again gives me a slow response.
Using the GPioMUX gives similarly slow response.
Does anyone know how to switch a EPwm module off/on within one cycle?