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
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
Hello Juan,
Which drivers do you use?
Can you share the project so that we can test it?
Thanks,
Daniel
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