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.

Does the InstaSPIN support the EN_Gate pin?

Other Parts Discussed in Thread: DRV8301, MOTORWARE, CONTROLSUITE

I was studying the DRV8301 schematic in the Control Suite directory.

The EN_GATE on the DRV8301 is connected to the DIMM100.  Can I assume that MotorWorks turns it on?  If not then I will need to tie it high..

 Also the bar fault pin appears to be connected.  Can I assume that MotorWorks is watching this pin?  If so, do  need to connect it or MotorWorks might fail to start?

Thanx

  • Will,

    In MotorWare, all of the drivers are handled in the drv.c/.h file. For the DRV8301 board those are located for InstaSPIN-FOC here:

    C:\ti\motorware\motorware_1_01_00_07\sw\solutions\instaspin_foc\boards\drv8301kit_revD\f28x\f2806xF\src

    In the case of the EN_GATE, that is done by this function from drv.h

    static inline void DRV_enablePwm(DRV_Handle handle)
    {
      DRV_Obj *obj = (DRV_Obj *)handle;

      // Enable the drv8301
      GPIO_setHigh(obj->gpioHandle,GPIO_Number_51);

      PWM_clearOneShotTrip(obj->pwmHandle[PWM_Number_1]);
      PWM_clearOneShotTrip(obj->pwmHandle[PWM_Number_2]);
      PWM_clearOneShotTrip(obj->pwmHandle[PWM_Number_3]);

      return;
    } // end of DRV_enablePwm() function

     

    GPIO 51 is connected to EN_GATE, as you can see from page 5 of the DRV8301 schematic

    C:\ti\controlSUITE\development_kits\DRV830x-HC-C2-KIT_v104\~DRV830x-HC-EVM-HWdevPkg\DRV830x_RevD_HWDevPKG\Schematic

     

    FAULT is used for the DRV83x to inform the MCU that it has faulted. This is connected to GPIO 14 per the HW, and in drv.c

      // FAULTn
      GPIO_setMode(obj->gpioHandle,GPIO_Number_14,GPIO_14_Mode_GeneralPurpose);

    I don't think we are checking the Fault in the MotorWare projects.  If the DRV83x faults the MCU software doesn't necessarily know.  We really should be doing this though.

    In the GUI project I added this some time ago. I periodically would run a checkDRVfaults() function. I think we would write this a bit differently now (I believe I cribbed this from the controlSUITE code of DRV8301-HC-C2-KIT) but what I used for the DRV8301 looks somethign like this.

           if(DRV_readGpio(drvHandle, DRV_8301_FAULTn) == 0)  // DRV has Faulted
            {
             // disable the PWM
          DRV_disablePwm(drvHandle);
          // Turn Off Drive (STOP)
          CTRL_setFlag_enableCtrl(ctrlHandle, FALSE);
          Gui.gRunController = FALSE;
          gdrv8301_stat_reg1.all = DRV_readSpiData(drvHandle, DRV_8301_STAT_REG_1_ADDR);
             gdrv8301_stat_reg2.all = DRV_readSpiData(drvHandle, DRV_8301_STAT_REG_2_ADDR);
          Gui.gFaultStatus = 2;   // Set Fault
            }