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.

CCS/INSTASPIN-BLDC: No PWM output from MCU

Part Number: INSTASPIN-BLDC
Other Parts Discussed in Thread: DRV8301, DRV8305, MOTORWARE

Tool/software: Code Composer Studio

Hi there,

I've developed my own high-power inverter around the TIf28069 launchpad and I'm having some struggles getting it set up. I'm running the lab_02a code for the BoostDrv8301 without the SPI code, with all motor parameters and voltage/current sensors setup of course, I've added #undef DRV8301_SPI and #undef DRV8305_SPI at the beginning of the code to disable any SPI interaction with the board (just trying to get it running quickly). Due to a board error my inverter holds the nOCTW pin LOW, which should be HIGH without an error of course. I think that this might cause the PWM inputs to be disabled but I can't find anything in the code that indicates this. Can this signal maybe cause the CTRL block to get into the CTRL_State_Error state??

Has anybody got tips on how to start writing code for a custom inverter board in general?

  • 1. You can follow the instaSPIN lab guide to use lab01b and lab01c to verify your hardware since you are using the board you designed.

    2. make sure that the sign of the current coefficient in HAL_readAdcData() in hal.h matches the current sensing circuit. Refer to chapter 5.2.2 Current Feedback Polarity in InstaSPIN user's guide (SPRUHJ1H, http://www.ti.com/lit/ug/spruhj1h/spruhj1h.pdf) to set the sign of the current scale factor.

     

    static inline void HAL_readAdcData(HAL_Handle handle,HAL_AdcData_t *pAdcData)

    {

       _iq current_sf = HAL_getCurrentScaleFactor(handle);

    }

    3. Set correct parameters based on the hardware board in user.h

    #define USER_IQ_FULL_SCALE_VOLTAGE_V           (xx)

    #define USER_VOLTAGE_FILTER_POLE_Hz               (xx)

    #define USER_ADC_FULL_SCALE_VOLTAGE_V       (xx)

    #define USER_IQ_FULL_SCALE_CURRENT_A           (xx)

    #define USER_ADC_FULL_SCALE_CURRENT_A       (xx)

    4. You might refer to the following 3 documentations to modify the related parameters and device configuration codes in the files of hal.c, hal.h and user.h according to the hardware board.

    instaspin_labs.pdf at "\ti\motorware\motorware_1_01_00_18\docs\labs"

    motorware_hal_tutorial.pdf at "\ti\motorware\motorware_1_01_00_18\docs\tutorials"

    InstaSPIN-FOC™ and InstaSPIN-MOTION™ User's Guide http://www.ti.com/lit/ug/spruhj1h/spruhj1h.pdf 

  • Thanks! I didn't check the current sign yet. I evetually managed to enable the PWM by disabeling one of the PWM trip zone signals, it was tied to GN on my board...

  • Good to know. Thanks!