AnsweredAssumed Answered

Understanding ADC + ADC-ETC

Question asked by Stefan Mitterhauser on Jan 29, 2020
Latest reply on Feb 7, 2020 by Stefan Mitterhauser


I am trying to understand the ADC and ADC-ETC peripheral and to configure them with MCUXpresso Tools v7. I have read the reference manual and a lot of posts but I still need some more information.


I have addeded the peripheral drivers ADC1, ADC2 and ADC_ETC to my MCUXpresso peripherals tool.



Question 1:

Hovering above this check box tells me that checking it will optimize ADC start up time, but how much faster will it be if I enable it?

The reference manual states

, but it does not tell me how much faster it will be?



Question 2:

How much higher is the ADC clock? The "normal" frequency is 10 MHz correct?



Question 3:

About the low power mode the pseudo-code example ( states in a comment that the low power mode lowers the maximum clock speed. Does it more? To which frequency does it lower the clock speed? If this one lowers the clock speed then selecting "high speed" and "low power" makes no sense right?



Question 4:

The ADC averaging of 4 samples is just a arithmetic average (e.g. Result = (Measurement1 + Measurement2 + Measurement3 + Measurement4)/4) right?



Question 5:

I want all channels of the ADCs to be controlled by ADC-ETC, but if I add more than one channel with the channel number to "CHANNEL_DRIVEN_BY_ADC_ETC" I get a warning that there are some duplicated ADC channels in the configuration. Do I have to set every channel with "CHANNEL_DRIVEN_BY_ADC_ETC" or just leave the "Channels configuration" empty?


**** After here ADC-ETC questions

Question 6:

The Trigger group depends on the selected Trigger source. If I hover above the Sync mode checkbox I can see that there are couples wich can be triggered from the same trigger.

I set up Trigger group 0 and now I want to also Trigger group 4 in sync to it. For that I have to set up a new XBARA Trigger configuration where I choose XBAR1_TRIG,0 as Trigger source and I set the Sync mode.

In the Trigger source field there is the entry "0 >> LOGIC_LOW" which suggests that the trigger is connected to GND. Do I have to be concerned about that or does it not matter?


**** Question 7:

The boxes "Desired initial delay" and "Desired interval delay"

have to be set to at least 1 tick. The reference manual entry to ETC_TRIG0 Counter Register does not mention that the counter has to be set at least to 1 tick.

Is it necessary to set it to 1 or is it allowed to be zero?


Hint to the MCUXpresso Config Tools Development Team: The text "Real interval delay" is used for the "Desired initial delay" settings and I think it should be "Real initial delay".


**** Question 8:

I want to measure the same input 8 times and at the end the DONE0 interrupt should be fired. I set the Chain configuration to

And after triggering once it will do chain 0, after chain 0 finished it will automatically do chain 1, then chain 2.... correct?


Will the data be stored in TRIG0_RESULT_1_0 DATA0 to TRIG0_RESULT_7_6 DATA7 or will every chain write the result of the measurement to TRIG0_RESULT_1_0 DATA0 because I selected "Conversion control group Group 0" for every chain?


**** Question 9:

What does the entry "Conversion control group" do?


**** Question 10:

If I want to sample one channel (e.g. ADC1 IN 14) 20 times, store the data to a buffer in RAM and after the 20th sample has been measured it shoud fire an interrupt? There should be no CPU intervention everything should be done in hardware until the interrupt condition is reached.

Do I have to use this method and emulate Scan Mode or is there another way?


Kind regards,