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.

LaunchXL-F28069, BoostXL-DRV8301 and sensorless trapezoidal control

Other Parts Discussed in Thread: BOOSTXL-DRV8301, DRV8301, DRV8312, MOTORWARE

Hi,

I am using the LaunchXL-F28069 with a BoostXL-DRV8301 pack to run a BLDC motor. I'm programming via Matlab/Simulink Embedded coder and implemented a sensorless FOC which is working great. However, I'm also looking into a backup BLDC trapezoidal control, which I had implemented on a DRV8312-C2-Kit before. 

While the total shunt current measurement is not available, I will use the individual measurements to compute the total current. I now ran into a problem with generating the PWM signals correctly. In order to measure the back-EMF in the unenergized phase both FETs in the respective half bridge need to be turned off. At the same time, a dead band has to be implemented to avoid shorting of the half bridge during the switching events. The PWM signals passed to the booster pack by the launchpad can each be disabled with the forcing to zero input of the simulink block. However, when the deadband unit is activated (active high complementary), it seems to overwrite the forcing to zero input, i.e. even when I enable both inputs for ePWMxA and ePWMxB, the complementary signal (ePWMxB) will stay at logic high level. I remember, that the DRV8312-C2-kit uses the RESET_x pins of the DRV8312 to disable the gates of each half bridge individually, however, the DRV8301 does not offer that option as there is only a single gate enable pin.

Did I miss any option in the ePWM settings or is there maybe an easy workaround? 

Thanks for your help,

Matthias

  • Hi Matthias,

    I am going to move your post to the C2000 InstaSPIN forums. They can better assist with the ePWM question. If you have a question directly on the DRV8301, let me know.

  • You can force the high and low outputs to zero with the force register (TZFRC). If you take a look at our projects in motorware, the disable pwm function does this:

    static inline void HAL_disablePwm(HAL_Handle handle)
    {
      HAL_Obj *obj = (HAL_Obj *)handle;
    
      PWM_setOneShotTrip(obj->pwmHandle[PWM_Number_1]);
      PWM_setOneShotTrip(obj->pwmHandle[PWM_Number_2]);
      PWM_setOneShotTrip(obj->pwmHandle[PWM_Number_3]);
    
      return;
    } // end of HAL_disablePwm() function

    Which call this function:

    static inline void PWM_setOneShotTrip(PWM_Handle pwmHandle)
    {
        PWM_Obj *pwm = (PWM_Obj *)pwmHandle;
    
    
        ENABLE_PROTECTED_REGISTER_WRITE_MODE;
    
        // set the bits
        pwm->TZFRC |= PWM_TZFRC_OST_BITS;
    
        DISABLE_PROTECTED_REGISTER_WRITE_MODE;
    
        return;
    } // end of PWM_setOneShotTrip() function

    That requires to have a PWM configuration for high and low, with deadtime, as we do in MotorWare (downloadable from )

    done in function HAL_setupPwms of hal.c (C:\ti\motorware\motorware_1_01_00_15\sw\modules\hal\boards\drv8301kit_revD\f28x\f2806x\src\hal.c)

    -Jorge