ADC is not working on ADC_ETC/PWM Sync mode

cancel
Showing results for 
Search instead for 
Did you mean: 

ADC is not working on ADC_ETC/PWM Sync mode

Jump to solution
278 Views
kenji
Contributor IV

Hi All

ADC is not working on ADC_ETC/PWM Sync mode.
As for the situation, wrong value is being read.

ADC_ETC/PWM Sync mode is working and I can control the ADC_ECT timing.

 

Below is my ADC and ADC_ETC settings. Are there any mistakes?

[ADC]

kenji_0-1628148636460.png

kenji_1-1628148649412.png

[ADC_ETC]

kenji_2-1628148695469.png

kenji_3-1628148712076.png

Also I tested this code.

kenji_0-1628158155473.png

I found that ADC is working, but even though it is 12bit AD, it cannot convert more than 2047.
Also channel group need to set to all 0. It does not work when the group set with the Config tool is selected. 

Please give me some advice.

 

 

Labels (4)
Tags (2)
0 Kudos
1 Solution
249 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hi Kenji, 

What is conversion control group?  According to the description, specifies which ADC trigger input will be used.
Yes, this is correct. The trigger is different depending on the channel groups. I mentioned this in my last reply to the other community thread. The conversion control group specifies which control register for hardware triggers and which result register (ADCx_HCn & ADCx_Rn) will be used for the conversion.

But according SDKs comment, channel group 0 is for Group A registers and channel group 1 is for Group B. Group A is ADC1 and Group B is ADC2?
When we mentioned Group A and Group B in the comment of the SDK was just to put an example that you can have one group in a channel group and a different group in another channel. 

And what is trigger group and chain group?
The ADC_ETC has one TSC external trigger and 8 external triggers from XBAR. The trigger group corresponds to these external triggers. To see more information regarding this, please refer to section 67.2.1 of the reference manual.
The chain group, one external trigger of ADC_ETC results in multiple sequential triggers, which are named as trigger chain, to ADC.

Regarding your example not working properly. I suggest you refer to the SDK project named adc_etc_software_trigger_conv. This way you will see all the configurations that are needed for the ADC_ETC module to work properly.

As additional information, you might find useful the information in the following threads to understand better this module. The bugs that are mentioned in those threads have been fixed in the current version of the Config tools. 

Solved: Are there bugs in ADC_ETC and ADC driver? - NXP Community

Solved: Understanding ADC + ADC-ETC - NXP Community

Solved: ADC_ETC B2B Mode - NXP Community

Regards,
Victor 

View solution in original post

0 Kudos
2 Replies
268 Views
kenji
Contributor IV

Hi @victorjimenez -san

 

 
 

I have A problem, as written above.

I have received your answer before, but I will ask you the same thing again.
What is conversion control group?  According to the description, specifies which ADC trigger input will be used.

kenji_0-1628169955198.png

But according SDKs comment, channel group 0 is for Group A registers and channel group 1 is for Group B. Group A is ADC1 and Group B is ADC2?

 

kenji_1-1628170176422.png

Which comment is correct?

And what is trigger group and chain group?
What is the relationship with conversion control group.

kenji_0-1628224505512.pngkenji_1-1628224530750.png

 

 

 

 

Tags (2)
0 Kudos
250 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hi Kenji, 

What is conversion control group?  According to the description, specifies which ADC trigger input will be used.
Yes, this is correct. The trigger is different depending on the channel groups. I mentioned this in my last reply to the other community thread. The conversion control group specifies which control register for hardware triggers and which result register (ADCx_HCn & ADCx_Rn) will be used for the conversion.

But according SDKs comment, channel group 0 is for Group A registers and channel group 1 is for Group B. Group A is ADC1 and Group B is ADC2?
When we mentioned Group A and Group B in the comment of the SDK was just to put an example that you can have one group in a channel group and a different group in another channel. 

And what is trigger group and chain group?
The ADC_ETC has one TSC external trigger and 8 external triggers from XBAR. The trigger group corresponds to these external triggers. To see more information regarding this, please refer to section 67.2.1 of the reference manual.
The chain group, one external trigger of ADC_ETC results in multiple sequential triggers, which are named as trigger chain, to ADC.

Regarding your example not working properly. I suggest you refer to the SDK project named adc_etc_software_trigger_conv. This way you will see all the configurations that are needed for the ADC_ETC module to work properly.

As additional information, you might find useful the information in the following threads to understand better this module. The bugs that are mentioned in those threads have been fixed in the current version of the Config tools. 

Solved: Are there bugs in ADC_ETC and ADC driver? - NXP Community

Solved: Understanding ADC + ADC-ETC - NXP Community

Solved: ADC_ETC B2B Mode - NXP Community

Regards,
Victor 

View solution in original post

0 Kudos