{
/*offset165 = ((float32) (VREF165_FB))*ADC_PU_SCALE_FACTOR;*/
iL1Meas = (((float32)(IL1_ADC_READ1+IL1_ADC_READ2+IL1_ADC_READ3+IL1_ADC_READ4))*ADC_PU_SCALE_FACTOR*0.25 – iL1MeasOffset )*2.0;
iL2Meas = (((float32)(IL2_ADC_READ1+IL2_ADC_READ2+IL2_ADC_READ3+IL2_ADC_READ4))*ADC_PU_SCALE_FACTOR*0.25 – iL2MeasOffset )*2.0;
iL3Meas = (((float32)(IL3_ADC_READ1+IL3_ADC_READ2+IL3_ADC_READ3+IL3_ADC_READ4))*ADC_PU_SCALE_FACTOR*0.25 – iL3MeasOffset )*2.0;
v1Meas = (((float32)(V1_ADC_READ1+V1_ADC_READ2+V1_ADC_READ3+V1_ADC_READ4))*ADC_PU_SCALE_FACTOR*0.25 – v1MeasOffset )*2.0;
v2Meas = (((float32)(V2_ADC_READ1+V2_ADC_READ2+V2_ADC_READ3+V2_ADC_READ4))*ADC_PU_SCALE_FACTOR*0.25 – v2MeasOffset )*2.0;
v3Meas = (((float32)(V3_ADC_READ1+V3_ADC_READ2+V3_ADC_READ3+V3_ADC_READ4))*ADC_PU_SCALE_FACTOR*0.25 – v3MeasOffset )*2.0;
vBusPMMeas = (((float32)(VBUSPM_ADC_READ1+VBUSPM_ADC_READ2+VBUSPM_ADC_READ3+VBUSPM_ADC_READ4))*ADC_PU_SCALE_FACTOR*0.25 )*VDCBUS_MAX_SENSE/VAC_MAX_SENSE;
vBusMNMeas = (((float32)(VBUSMN_ADC_READ1+VBUSMN_ADC_READ2+VBUSMN_ADC_READ3+VBUSMN_ADC_READ4))*ADC_PU_SCALE_FACTOR*0.25 )*VDCBUS_MAX_SENSE/VAC_MAX_SENSE;
1) vBusPMMeas = m_VBusPMMeas*vBusPMMeas + b_VBusPMMeas; // y= mx+ b equation used to reduce offset and gain error
2) vBusMNMeas = m_VBusMNMeas*vBusMNMeas + b_VBusMNMeas;
3) vBusMeas= vBusPMMeas+vBusMNMeas;
4) vBusHalfMeas = (vBusMeas)*0.5;
// clamp the vBusHalfMeas before dividing to avoid NaN
vBusHalfMeas = (vBusHalfMeas<0.2)?0.2:vBusHalfMeas;
}
问题描述:
理论仿真时程序指针应该时从1)>2)>3)>4),这个顺序执行但实际仿真过程中不安上述执行,感觉程序指针乱跑,一会跑到4)一会跑到1)一会跑到函数外面,之后又跑到函数里面。给人感觉就是乱跑。以上没有条件编译。不要给我解释有条件编译导致的。
Green Deng:
你好,为了更加有效地解决你的问题,我已将此问题升级至英文E2E论坛,你可以通过以下帖子链接查看FAE的回复:
e2e.ti.com/…/957839
如果需要追加提问,你也可以使用校园邮箱作为账号进行注册登录,并进行回复或者发布新的帖子。