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.

Reading ADC data for current sensing from DRV8301 bord.

Other Parts Discussed in Thread: DRV8301

Hi all,

I am reading ADC values of phase current sensors in DRV8301. 

I did the following for that i made a function in hal.h

static inline CurrentSensorRead_A(HAL_Handle handle)

{

HAL_Obj *obj = (HAL_Obj *)handle;
int gIAread = 0;
gIAread = ADC_readResult(obj->adcHandle,ADC_ResultNumber_1);

return gIAread;

}

and i call that function inside while loop in project man function.

Is there a mistake i am doing? as in watch window the ADC values are fluctuating (say in between 2061-2072).

Thanks.