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.


Other Parts Discussed in Thread: BOOSTXL-DRV8320S, LAUNCHXL-F280049C, , DRV8320

Tool/software: Code Composer Studio


I currently have the IS10_rs_recalc demo software working with BOOSTXL-DRV8320S mated with the LAUNCHXL-F280049C.  It's spinning the motor and everything works well.

I have been trying to convert the code to work with the same motor and same launchpad but with the BOOSTXL-3PHGANINV board, and I just cannot get it to work.

Here's what I've done so far:

  1. user.h:
    1. changed the scaling:
      1. #define USER_ADC_FULL_SCALE_VOLTAGE_V   ((float32_t)(81.499))    //was (57.528))
      2. #define USER_ADC_FULL_SCALE_CURRENT_A   ((float32_t)(33))    //was (42.843))
      3. #define IA_OFFSET_A (-16.5)  //WAS (-21.428)
      4. #define IB_OFFSET_A (-16.5)  //WAS (-21.428)
      5. #define IC_OFFSET_A (-16.5)  //WAS (-21.428)

  2. HAL.c:
    1. Removed any setup or use of DRV8320 SPI
    2. Remapped the A/Ds in HAL_setupADCs to match the different entry points of the voltages and currents
    3. Disabled the PGA on the current inputs due to the gain of 20 on the current sensors
    4. I kept the interrupt on ADCB1, is this ok?
    5. I disabled the DAC output on to the header that was needed on the BOOSTXL-DRV8320S
    6. Changed GPIO to match the change in pin duties
  3. HAL.h:
    1. in HAL_readADCDataWithOffsets
      1. change "float32_t current_sf = HAL_getCurrentScaleFactor(handle)" //removed negative sign since the BOOSTXL-3PHGANINV is inverting on currents
      2. remapped voltages and currents to match the changes in HAL.c
  4. Changed the line in BOOSTXL-3PHGANINV

One general question, can I keep the BOOSTXL-3PHGANINV on the same headers as the BOOSTXL-DRV8320S was on, namely J1/J2?  The only image I've seen has the BOOSTXL-3PHGANINV on J5/J6?

Any ideas on what I'm missing?  Thanks for any help!

  • GH - I wanted to apologize for the delay.  We are trying to find the best person to help you with this question. 

  • The voltage filter pole frequency should be set according to the hardware board. And back to use is03, is03, and is05 to verify the hardware configuration.

    //! \brief Defines the analog voltage filter pole location, Hz
    #define USER_VOLTAGE_FILTER_POLE_Hz ((float32_t)(1103.026917))

  • Hello Lori,Yanming,

    Thank you for your reply!

    I did this:  #define USER_VOLTAGE_FILTER_POLE_Hz ((float32_t)(1103.026917))  

    Where is this used?  I cannot find where in the code it's used, is it used directly by a library?

    I replaced my main file with the contents of "is03_hardware_test.c" so I don't have to modify as many files to reroute the header lines (A/D lines, gpio etc).  I followed the instructions for is03, and it fails the first step, when I attempt to set motorVars.flagEnableSys =1 it works, but then when I set motorVars.flagRunIdentAndOnLine=1 it won't stay set, and needless to say the motor doesn't spin.  I should mention this is the same outcome I get when running my normal code based on "is10_rs_calc.c"

    in "Hal.c", with the remapping that has to take place with the A/D inputs, is it appropriate to keep the interrupt on ADCB1 as it is with the BOOSTXL-DRV8320S board?


  • Yes, the FAST library needs this parameter for the angle and speed estimation. You might take a look at chapter 5.2 (Hardware Prerequisites) of InstaSPIN-FOC™ and InstaSPIN-MOTION™ User's Guide if you want to know more details. 

    It seems likes you didn't change the configuration according to the hardware, so there is fault protection ( the variable "motorVars.faultUse" is not equal to zero) that disables starting the motor. . You have to refer to the schematic of the boostxl-3phgan to change the GPIO, ADC, Comparator, and Fault Protection configuration in hal.c. Attached file please more details.

    Guidelines for new hardware boards with motor control SDK.pdf

  • Yanming,

    Thanks for the reply.  If you read my first post, you'll see i did change HAL.c according to the new hardware.

    It turns out that the PGA needed to be bypassed in the comparator settings to avoid the processor thinking there's an overcurrent situation.