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.

TMS320F28027F: Is there any available source code with driver 8301 for bldc motor(A2212/13T)

Part Number: TMS320F28027F
Other Parts Discussed in Thread: DRV8301, , MOTORWARE

Tool/software:

i'm using TMS320F28027F and DRV8301 BLDC motor. I have no any idea about that. Give me source code 

Can anyone has guide me.

  • // GPIO-00 - PIN FUNCTION = PWM_AH
    GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1; // 0=GPIO, 1=EPWM1A, 2=Resv, 3=Resv
    // GpioCtrlRegs.GPADIR.bit.GPIO0 = 1; // 1=OUTput, 0=INput
    // GpioDataRegs.GPACLEAR.bit.GPIO0 = 1; // uncomment if --> Set Low initially
    // GpioDataRegs.GPASET.bit.GPIO0 = 1; // uncomment if --> Set High initially
    //--------------------------------------------------------------------------------------
    // GPIO-01 - PIN FUNCTION = PWM_AL
    GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 1; // 0=GPIO, 1=EPWM1B, 2=Resv, 3=COMP1OUT
    // GpioCtrlRegs.GPADIR.bit.GPIO1 = 0; // 1=OUTput, 0=INput
    // GpioDataRegs.GPACLEAR.bit.GPIO1 = 1; // uncomment if --> Set Low initially
    // GpioDataRegs.GPASET.bit.GPIO1 = 1; // uncomment if --> Set High initially
    //--------------------------------------------------------------------------------------
    //GPIO-02 - PIN FUNCTION = PWM_BH
    GpioCtrlRegs.GPAMUX1.bit.GPIO2 = 1; // 0=GPIO, 1=EPWM2A, 2=Resv, 3=Resv
    // GpioCtrlRegs.GPADIR.bit.GPIO2 = 0; // 1=OUTput, 0=INput
    // GpioDataRegs.GPACLEAR.bit.GPIO2 = 1; // uncomment if --> Set Low initially
    // GpioDataRegs.GPASET.bit.GPIO2 = 1; // uncomment if --> Set High initially
    //--------------------------------------------------------------------------------------
    // GPIO-03 - PIN FUNCTION = PWM_BL
    GpioCtrlRegs.GPAMUX1.bit.GPIO3 = 1; // 0=GPIO, 1=EPWM2B, 2=SPISOMI-A, 3=COMP2OUT
    // GpioCtrlRegs.GPADIR.bit.GPIO3 = 0; // 1=OUTput, 0=INput
    // GpioDataRegs.GPACLEAR.bit.GPIO3 = 1; // uncomment if --> Set Low initially
    // GpioDataRegs.GPASET.bit.GPIO3 = 1; // uncomment if --> Set High initially
    //--------------------------------------------------------------------------------------
    //GPIO-04 - PIN FUNCTION = PWM_CH
    GpioCtrlRegs.GPAMUX1.bit.GPIO4 = 1; // 0=GPIO, 1=EPWM3A, 2=Resv, 3=Resv
    // GpioCtrlRegs.GPADIR.bit.GPIO4 = 0; // 1=OUTput, 0=INput
    // GpioDataRegs.GPACLEAR.bit.GPIO4 = 1; // uncomment if --> Set Low initially
    // GpioDataRegs.GPASET.bit.GPIO4 = 1; // uncomment if --> Set High initially
    //--------------------------------------------------------------------------------------
    //GPIO-05 - PIN FUNCTION = PWM_CL
    GpioCtrlRegs.GPAMUX1.bit.GPIO5 = 1; // 0=GPIO, 1=EPWM3B, 2=SPISIMO-A, 3=ECAP1
    // GpioCtrlRegs.GPADIR.bit.GPIO5 = 0; // 1=OUTput, 0=INput
    // GpioDataRegs.GPACLEAR.bit.GPIO5 = 1; // uncomment if --> Set Low initially
    // GpioDataRegs.GPASET.bit.GPIO5 = 1; // uncomment if --> Set High initially

    I am using tms320f28027f and DRV8301 to run BLDC motor. In above code GPIO configuration. In this code sum of lines are commented. Any changes are not, if any changes means above lines are uncommented are not. Please tell me.

    I am example taken Instaspin_BLDC_GUI_project

  • You don't need to care these commented codes, just refer to the example to port the code to the board you used. If you only want to do an research evaluation, you can use the existing TI EVM kit directly.

  • LAUNCH PAD TMS320F28027F with DRV8301 to run BLDC Motor. Any source code are available are not. Please give me suggestions. Lab5b example taken to run bldc motor are not and any changes in the code are not.

     Instaspin_BLDC_GUI_project example taken to run bldc motor are not and any changes in the code are not

  • Hi Yanming Luo

    I taken direct TI LAUNCHPAD TMS320F28027F with  BOOSTXL DRV8301 board.

    I taken example ti/contolsuite/development_kitsDRV830x-HC-C2-KIT-v/GUI_project_instaspin_BLDC.

    To run BLDC motor without any code modification, but cannot the BLDC motor.

    DRV8031 board Supports 6 to 24 V and up to 10-A RMS (14-A Peak).

    I am taken 6volts and current 0.6amps but cannot run BLDC motor. 

    Any modifications in code like configurations (GPIO, ADC, PWM)

    the above code are send in the GUI_project_instaspin_BLDC code. But you are saying cannot change any modification direct run its working.  but cannot run the motor.

  • You may try to use the example in motorWare if you want to run the BLDC with sensorless-FOC. Which could be easy to start running the motor without any more changes.

    MotorWare Software: Includes InstaSPIN-FOC and InstaSPIN-Motion based 3-phase motor control applications for F2802x, F2805x, and F2806x series, supports ACIM, PMSM and BLDC using FOC.

    Download and install motorware which has many example projects to support this kit, and follow the lab guide to understand these lab projects.

    MotorWare: http://www.ti.com/tool/motorware

     

    Please take a look at guides in the folders below in motorWare, and follow the guides to set up the kits and run the lab.

    C:\ti\motorware\motorware_1_01_00_18\docs\labs\instaspin_labs.pdf

    C:\ti\motorware\motorware_1_01_00_18\docs\boards\kits\docs\readmefirst_instaspin_launchboost.pdf