S32K118 ADC Averaging issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K118 ADC Averaging issue

991 Views
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

 

Labels (1)
0 Kudos
3 Replies

953 Views
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 Kudos

977 Views
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 Kudos

974 Views
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 Kudos