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.

关于DSP28035电流校准程序

#define OFFSET_GRIDCURRENT_MEAS _IQ24(0.553)
offset_GridCurrent = OFFSET_GRIDCURRENT_MEAS;


OffsetCalCounter=0;
offset_GridCurrent=0;
PV_SenseCurr_Offset=0;
while(OffsetCalCounter<5000)
{
if(AdcRegs.ADCINTFLG.bit.ADCINT1==1)
{
PV_SenseCurr_Offset= _IQmpy(K1,PV_SenseCurr_Offset)+_IQmpy(K2,_IQ12toIQ(IPV_FB));
offset_GridCurrent=_IQmpy(K1,offset_GridCurrent)+_IQmpy(K2,_IQ12toIQ(IINV_FB));
OffsetCalCounter++;
AdcRegs.ADCINTFLGCLR.bit.ADCINT1 = 1; // Clear ADCINT1 flag
}

电流校准程序是怎么得来的?在电流校准程序前,定义offset_GridCurrent = OFFSET_GRIDCURRENT_MEAS;是什么作用?后面不是把offset_GridCurrent;变为0 了吗?