This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
Hello,
I want to many PWM signals and at one point I just want to disable or set the output of one of them to low, both A and B, and after a while turn them on again. I was trying to do it with the following function to set them to low state:
EPWM_setActionQualifierContSWForceAction(PSFB2_DRV_EPWM_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_SW_OUTPUT_LOW);
EPWM_setActionQualifierContSWForceAction(PSFB2_DRV_EPWM_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_SW_OUTPUT_LOW);
And the "EPWM_AQ_SW_DISABLED" parameter to restore the operation. As far as I have done, it is working but I have a problem with setting them to low...
The PWM_A goes to low but the PWM_B goes to high, so they work kind of inverted... could you help me to solve this?
Thank you very much.
BR,
Luis
Is the deadband module with complimentary output enabled?
Is there any other actions you have for the SW force somewhere else in the code?
Hi Nima,
Yes, you are right, the deadband is creating a complementary PWM. When I disable the deadband, the PWM is working fine. How can I do so this doesn´t happen and I still can keep the deadband...?
The deadband is configured as following:
EPWM_setDeadBandDelayMode(PWMbase, EPWM_DB_RED, true);
EPWM_setDeadBandDelayMode(PWMbase, EPWM_DB_FED, true);
EPWM_setRisingEdgeDeadBandDelayInput(PWMbase, EPWM_DB_INPUT_EPWMA);
EPWM_setFallingEdgeDeadBandDelayInput(PWMbase, EPWM_DB_INPUT_EPWMA);
EPWM_setDeadBandDelayPolarity(PWMbase, EPWM_DB_FED, EPWM_DB_POLARITY_ACTIVE_LOW);
EPWM_setDeadBandDelayPolarity(PWMbase, EPWM_DB_RED, EPWM_DB_POLARITY_ACTIVE_HIGH);
EPWM_setFallingEdgeDelayCount(PWMbase, PSFB_EPWM_DEADBAND_FED);
EPWM_setRisingEdgeDelayCount(PWMbase, PSFB_EPWM_DEADBAND_RED);
And no, there aren't any other actions on the SW force, just the way to set the shadow more:
EPWM_setActionQualifierContSWForceShadowMode(PWMbase , EPWM_AQ_SW_IMMEDIATE_LOAD);
Thank you!
Can you use the TripZone module/DC module? I believe they take affect AFTER the deadband module.