Other Parts Discussed in Thread: BOOSTXL-DRV8320S, LAUNCHXL-F280049C, , DRV8320
Tool/software: Code Composer Studio
Hello,
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:
- user.h:
- changed the scaling:
- #define USER_ADC_FULL_SCALE_VOLTAGE_V ((float32_t)(81.499)) //was (57.528))
- #define USER_ADC_FULL_SCALE_CURRENT_A ((float32_t)(33)) //was (42.843))
- #define IA_OFFSET_A (-16.5) //WAS (-21.428)
- #define IB_OFFSET_A (-16.5) //WAS (-21.428)
- #define IC_OFFSET_A (-16.5) //WAS (-21.428)
- changed the scaling:
- HAL.c:
- Removed any setup or use of DRV8320 SPI
- Remapped the A/Ds in HAL_setupADCs to match the different entry points of the voltages and currents
- Disabled the PGA on the current inputs due to the gain of 20 on the current sensors
- I kept the interrupt on ADCB1, is this ok?
- I disabled the DAC output on to the header that was needed on the BOOSTXL-DRV8320S
- Changed GPIO to match the change in pin duties
- HAL.h:
- in HAL_readADCDataWithOffsets
- change "float32_t current_sf = HAL_getCurrentScaleFactor(handle)" //removed negative sign since the BOOSTXL-3PHGANINV is inverting on currents
- remapped voltages and currents to match the changes in HAL.c
- in HAL_readADCDataWithOffsets
- 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!