S32K118 ADC Averaging issue

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

S32K118 ADC Averaging issue

1,874 次查看
juan_francisco
Contributor I

Hello,

 

I am working with MCU: S32K118.

I'm trying to enable the HW average option in several Adc gropus from the same AdcHwUnit. The problem is that after enabling it in two of the three adc groups I have, one is working as expected but the rest are either not updated or return 0 constantly. 

The configuration was the following:

AdcHwUnit:

- Adc transfer type: ADC_INTERRUPT

- Adc resolution: 12 bits.

Adc group 1 and 2:

- Adc Group Access Mode: ADC_ACCESS_MODE_SINGLE

- Adc Group Conversion Mode: ADC_CONV_MODE_ONESHOT

- Adc Hardware Average Enable

- Adc Hardware Average Select: SAMPLES_8

- Adc Sample Time Duration (2 -> 256) : 256

- Adc Clock Divide Select: DIV_8

Adc group 3:

- Adc Group Access Mode: ADC_ACCESS_MODE_SINGLE

- Adc Group Conversion Mode: ADC_CONV_MODE_ONESHOT

- Adc Hardware Average Disable

 

Any idea about what can be happening?

 

Thanks in advance,

Juan Francisco

 

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

1,836 次查看
hungnguyenphi
NXP Employee
NXP Employee

Hello @juan_francisco ,

 

I have tried to configure the same with you and I still can run normally (Please see attached project).

Just one more note, I just see that when we enable the average conversion. ADC channel will take more time to convert. So the trigger time need to be adjusted.   

 

Best regards,

Hung

0 项奖励
回复

1,860 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Juan,

Which drivers do you use?

Can you share the project so that we can test it?

 

Thanks,

Daniel

 

0 项奖励
回复

1,857 次查看
juan_francisco
Contributor I

Hi Daniel,

Here is the Adc module info:

Id: Adc_TS_T40D3M10l1R0

label: Adc (V1.0.1, AS4.2.2).

 

I'm not allow to share the project, apologies.

 

Thanks for the support,

 

Juan Francisco

0 项奖励
回复