S32K ADC HW averaging issue

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

S32K ADC HW averaging issue

756 次查看
adria
Contributor I

Hello,

MCU: S32K146

SDK: S32SDK_S32K1xx_RTM_3.0.0

RTOS: FreeRTOS

With the next ADC configuration:

- Clock: 8 MHz

- Number of ticks per sample: 12

- Trigger: by PDB

- HW averaging: enabled

- Number of samples per average: 32 (max)

I am facing an issue, which is getting an offset of 30 (digital) when performing a conversion, no matter whether it is in open load or there is a load present. I know those conversion results have an offset because when I perform conversions with HW averaging disabled, then I get in all cases values minus 30 (compared to conversions with HW averaging enabled).

If I increase the number of ticks per samples from 12 to 255 and enable HW averaging, then this offset of 30 disappears.

Note: I am always calibrating at the beginning ADC_DRV_AutoCalibration().

Can anybody please help me understand and solve this issue?

Best regards,

Adria

标签 (1)
0 项奖励
回复
1 回复

666 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Adria,

If I understand, you see voltage rising on the pin during the 32 back-to-back conversions on a single channel.

When the ADC is sampling the analog pin, the pin gets connected and disconnected from the ADC.

The switching can inject a small amount of charge to the pin. And over the 32 samples, it can built up.

It depends mainly on the source resistance. If the resistance is low, it can clear the charge from the pin in time.

Or the time can be extended by increasing the number of ticks per sample.

Regards,

Daniel

0 项奖励
回复