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/DRV8312-69M-KIT: I_A_offset neagtive values

Part Number: DRV8312-69M-KIT

Tool/software: Code Composer Studio

Hello

#define   I_A_offset    (-0.8679359555)
#define   I_B_offset    (-0.8716403842)
#define   I_C_offset    (-0.8716837168)

these are the rsults that i always get. I have the DRV8312-69M-KIT and followed all instructions of lab 3a.

I am just looking for an axplanation since the engine is running just fine.

Thank youand kind regards

Johannes Freyer

  • The current feedback used the differential sample amplify, and the negative pin of the shunt resistor, which is connected to ground, is also
    connected to the inverting pin of the operational amplifier, so the polarity is opposite of real current. Refer to below code in HAL_readAdcData() in hal.h.

    iq current_sf = -HAL_getCurrentScaleFactor(handle);

    value = (_iq)ADC_readResult(obj->adcHandle,ADC_ResultNumber_1);
    value = _IQ12mpy(value,current_sf) - obj->adcBias.I.value[0];
    pAdcData->I.value[0] = value;

    To read correct current result, so need to set the current offset to negative. You can refer to Chapter 5.2 in spruhj1g.pdf to find more information.