Calibration of Offset error and Gain error of ADC in KV4x

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Calibration of Offset error and Gain error of ADC in KV4x

1,356 次查看
illiasatskyi
Contributor I

Hello I am using KV4x series controller in my project, where I spin IPM motor. And in previous series KV1x, KV3x there is a good description (in datasheet, and in examples in demo projects) how to calibrate the Offset error and Gain error of ADC. 

Also there is a document with a description of this calibration - AN5314. In KV1x, KV3x there are aveilable registers for automatic ADC calibration, and they described very well.

   In KV4x series there is only one ADC Offset Register (ADC_OFFSTn) with only few lines of description:
The value of the offset register is used to correct the ADC result before it is stored in the
RSLT registers.The offset value is subtracted from the ADC result. To obtain unsigned results, program
the respective offset register with a value of $0000, thus giving a result range of $0000 to
$7FF8.

   And there is also any available calibration examples in demo projects for KV4x, and there are no any availble registers in datasheet for this automatic calibration.

          So the question is how to to calibrate the Offset error and Gain error of ADC on KV4x controllers?

0 项奖励
回复
1 回复

1,097 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Satskyi,

First of all, the ADC_OFFSTn register for each channel is NOT designed for calibration, it is designed for zero-crossing feature. As you know that the ADC can only sample positive analog signal in single-ended mode, in other bwords, it can only sample from GND to Vrefh(3.3V) voltage. For example, you sample a sinusoidal signal which range from GND to 3.3V and you want to implement the zero-crossing feature(at the 1.67V voltage, zero-crossing happens), in the case, you can set the

ADC_OFFSTn register as 0x4000, in the case,this is the list of analog voltage to ADC sample:

analog voltage                            ADC_RSLTn with ADC_OFFSTn register as 0x400

GND                                            0xC000

1.67V,                                           0x00,

3.3V                                              0x4000

In this way, we can implement the zero-crossing feature or subtract a DC value.

Regarding the calibration, i do not think the ADC converters can implement hardware calibration. But you can implement software calibration, you can sample the known analog voltage at two pointsand get the gain/offset.

Hope it can help you

BR

xiangjun Rong

0 项奖励
回复