AnsweredAssumed Answered

ADC with ADC_ETC configuration

Question asked by Leonid Shigris on Feb 4, 2020
Latest reply on Feb 12, 2020 by Leonid Shigris

Hello,

 

My question according to ADC,

I don't understand all adc configurations:

 

I have to config ADC1 10 channels and use ADC_ETC.

My reference the next discussion: RT1064 ADC_ETC with DMA 

 

According to example in discussion:

I don't understand next configuration:

ADC_SetChannelConfig(ADC1, 0, &adcChannelConfigStruct);
ADC_SetChannelConfig(ADC1, 1, &adcChannelConfigStruct);
ADC_SetChannelConfig(ADC1, 2, &adcChannelConfigStruct);
ADC_SetChannelConfig(ADC1, 3, &adcChannelConfigStruct);

ADC_SetChannelConfig(ADC1, 4, &adcChannelConfigStruct);
ADC_SetChannelConfig(ADC1, 5, &adcChannelConfigStruct);

 

ADC_SetChannelConfig accepts up to 8 channels (0-7), If  required to config more than 8 channels?

 

 

I see each channel composed with another group (ADC1 Trigger group 0):

channel 0 with group 0, channel 1 with group 1:

 

adcEtcTriggerChainConfig.enableB2BMode = true;
adcEtcTriggerChainConfig.ADCHCRegisterSelect = 1U << DEMO_ADC_CHANNEL_GROUP0; /* Select ADC_HC0 register to trigger. */
adcEtcTriggerChainConfig.ADCChannelSelect = DEMO_ADC_ETC_CHANNEL0; /* ADC_HC0 will be triggered to sample Corresponding channel. */
// adcEtcTriggerChainConfig.InterruptEnable = kADC_ETC_Done0InterruptEnable; /* Enable the Done0 interrupt. */
adcEtcTriggerChainConfig.InterruptEnable = kADC_ETC_InterruptDisable; /* Disable the Done0 interrupt. */
ADC_ETC_SetTriggerChainConfig(ADC_ETC, 0U, DEMO_ADC_CHANNEL_GROUP0, &adcEtcTriggerChainConfig); /* Configure the trigger0 chain0. */

adcEtcTriggerChainConfig.ADCHCRegisterSelect = 1U << DEMO_ADC_CHANNEL_GROUP1; /* Select ADC_HC1 register to trigger. */
adcEtcTriggerChainConfig.ADCChannelSelect = DEMO_ADC_ETC_CHANNEL1; /* ADC_HC1 will be triggered to sample Corresponding channel. */
// adcEtcTriggerChainConfig.InterruptEnable = kADC_ETC_Done1InterruptEnable; /* Enable the Done1 interrupt. */
adcEtcTriggerChainConfig.InterruptEnable = kADC_ETC_InterruptDisable; /* Disable the Done1 interrupt. */
ADC_ETC_SetTriggerChainConfig(ADC_ETC, 0U, DEMO_ADC_CHANNEL_GROUP1, &adcEtcTriggerChainConfig); /* Configure the trigger0 chain1. */

 

does possible config several channels to same group:

like channel 2, 3, to group 2  in same trigger group?

 

 

 

What the correct way config more than 8 channels?

Pls advise,

 

Kind Regards,

Leon.

Outcomes