TMS320F280039-Q1: How to use BSXL3PHGAN_REVA build configuration code to drive the non-spi DRV8316 using universal motor control lab

Part Number: TMS320F280039-Q1


Hi team,

Now my customer using BSXL3PHGAN driver configuration to driver the BSXL3PHGAN successfully, and they want to change the BSXL3PHGAN to DRV8316T(non-SPI)

And they don't want to change the driver, so I try to using the same BSXL3PHGAN driver but change the hardware pin connection.

For BSXL3PHGAN, it connects the PWM to INHx/INLx, ADCINx to Udc, Uphase and Iphase, MTR1_GATE_EN_GPIO to enable pin, MTR1_PM_nFAULT_GPIO to OT.

For DRV8316T, I connect the corresponding pin(setted in hal.h) between F280039 Launchpad and DRV8316T EVM(EPWM--> INHx and INLx, ADCINx --> VSENx, ADCINx --> ISENx, ADCINx --> Vdc, MTR1_GATE_EN_GPIO --> DRVOFF)

Set the DMC_BUILDLEVEL to DMC_LEVEL_2, the outA of DRV8316T can output EPWM successfully, the waveform has the same phase with the EPWM output of F280039, but the current/voltage offset is uncorrect

image.png

Then I set the DMC_BUILDLEVEL to DMC_LEVEL_1 and run the runMotor1OffsetsCalculation(), and use the value in motorHandle_M1 update to below variable, but the result still uncorrect

image.png

Could you tell me how to set the offset of Iphase and Uphase and scale factor of the sample signal?

Thanks

BRs

Shuqing