AnsweredAssumed Answered

Are there bugs in ADC_ETC and ADC driver?

Question asked by Stefan Mitterhauser on Feb 5, 2020
Latest reply on Feb 10, 2020 by Stefan Mitterhauser


I found some points where I think that the MCUXpresso Config Tools v7 and the RT1020 Reference Manual are inconsistent.



ADC_ETC SW and HW Trigger Mode

the reference manual of RT1020 states in the ADC-ETC Features list (61.2.2 in my version of the manual) that every trigger source can be configured as HW or SW trigger mode.

Additionally every TRIGx_CTRL register has the field TRIG_MODE which specifies HW or SW trigger mode.


In MCUXpresso Config Tools v7 > peripheral tool the help text states that only Trigger 0 can be used as software trigger

If I select the Software trigger mode and then switch the Trigger source to XBAR0_Trig,1 the checkbox will be greyed out and I can not change the Software trigger mode but it will keep the setting for it (from the selection before switching to XBAR0_Trig,1). The setting will also be set in the generated source code.


Is the reference manual correct and every Trigger source can be used as Software Trigger or is the setting in MCUXpresso Config Tools correct and only XBAR0_TRIG 0 can be used as Software Trigger?


Maybe the incorrect information comes from the ADC peripheral where only the ADCx_HC0 register can be used as Software Trigger.




ADC_ETC and ADC peripheral Conversion control group

It is possible to select Group 0 to Group 15 in the ADC peripheral driver but the RT1020 only has 8 registers per ADC.

If I select the ADC1 peripheral driver and a Conversion control group 15 the generated code includes the line

ADC_SetChannelConfig(ADC1_PERIPHERAL, 15U, &ADC1_channels_config[0]);

and this method tests the second parameter with


where the macro is defined as



For the ADC_ETC peripheral I'm not sure how the value from HWTSx gets translated to the ADC registers. This overview

looks like every trigger input (trg0 to trg7) can be used for either ADC1 or ADC2 because of the Arbiter - Is that true? To which ADC does the TRIG0_CHAIN_1_0 register belong? And to which ADCx_HCn register does a HWTS0 value of 15 belong?


In the peripherals tool i can choose these trigger sources

which does not show which trigger is used for which ADC. This table in the reference manual for RT1020

shows that all ADC_ETC Trigger inputs are connected to the XBAR1 peripheral. Why are they named XBAR0 and XBAR1 in MCUXpresso Config Tools?




The RT1010 and RT1020 do not have a Touch Screen Controller so I think it would be better understandable if this part

of the ADC_ETC driver will be greyed out or removed for the RT1010 and RT1020 devices and the default values set in code to

.enableTSCBypass = false,
.enableTSC0Trigger = false,
.enableTSC1Trigger = false,



Copy from another post as info for MCUXpresso Config Tools Development Team:

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.


My question got answered and it is allowed to be 0.


Additional info: The text "Real interval delay" is used for the "Desired initial delay" settings and I think it should be "Real initial delay".





I have posted several other questions about the ADC and ADC_ETC on the IMXRT forum but no answers yet - depending on the answer to Question 5 of this post it is possible that there is something wrong with the warning generation of the ADC peripheral driver.


Kind regards,