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.

How to Impleent BLDC Trapezoidal Drive using ePWM Peripherals



Hi,

I have previously implemented a bldc trap drive (6 step commutation) on an F2407. That mcu has the PWM module not the new ePWM module. In order to commutate on a Hall sensor state change I used the Action Control Register  ACTRA to open all legs of the bridge ( *ACTRA = 0), wait my desired deadband time, and then adjust the bridge to the next phase via *ACTRA = EVAState_table[HallValue].  The ACTRA register acted upon all six FETs of the bridge in one clock cycle, so that all FETs are switched  simultaneously.

On the F28335, which uses the newer ePWM peripheral, how do I commutate all FETs of the bridge simulaneously? I could use the Action Qualifier Continuous Software Force register to switch one leg of the bridge (i.e. two FETs) something like EPwm1Regs.AQCSFRC.all = 0x0005, but then I would have to issue a similar command for the other two legs of the bridge i.e. one for EPWM2, and EPWM3. The switching of the entire bridge would not be simultaneous as happens in the PWM peripheral on the 2407. I'm somewhat confused as to how to accomplish this with the new ePWM peripherals.

I will not be using the DCM library.

Regards,

   Scott

  • The control should be very similar.... the action qualifier module will offer you all the options. As I understand, in a six pulse commutation one doesn't need to worry about dead band as the upper and lower switches of the same leg are not switched simultaneously. The switching mode moves every 60 degrees. One possible way to commutate is to interrupt every PWM cycle and check if 60 degree boundary has changed or not ... and if yes, then change switching accordingly ...all PWM outputs can be kept "off" except the required pair for that particular 60 degree segment.  There are other options can be implemented as well... For example PWM action for both switches or keeping one switch ON all the time while PWM the other.

    You may actually cut your development time significantly by utilizing the DMC library but it should be fine if you dont want to use the code but at least check out the documentation to get the ideas on implementation using the later devices.