I'm using multiple AD channels of the s32k144 MCU, but only one of them reads. Below is my code. What can I do to resolve this?
//ADC1_SE1
/* Configure the ADC converter - See ADC component for the configuration details */
ADC_DRV_ConfigConverter(ADC_INSTANCE1, &adConv2_ConvConfig0);
/* Configure ADC channel and software trigger a conversion */
ADC_DRV_ConfigChan(ADC_INSTANCE1, ADC_CHN1, &adConv2_ChnConfig1);
/* Wait for the conversion to be done */
ADC_DRV_WaitConvDone(ADC_INSTANCE1);
/* Store the channel result into a local variable */
ADC_DRV_GetChanResult(ADC_INSTANCE1, ADC_CHN1, &valorAD);
//ADC1_SE2
/* Configure the ADC converter - See ADC component for the configuration details */
ADC_DRV_ConfigConverter(ADC_INSTANCE1, &adConv2_ConvConfig0);
/* Configure ADC channel and software trigger a conversion */
ADC_DRV_ConfigChan(ADC_INSTANCE1, ADC_CHN2, &adConv2_ChnConfig2);
/* Wait for the conversion to be done */
ADC_DRV_WaitConvDone(ADC_INSTANCE1);
/* Store the channel result into a local variable */
ADC_DRV_GetChanResult(ADC_INSTANCE1, ADC_CHN2, &valorAD);
//ADC1_SE0
/* Configure the ADC converter - See ADC component for the configuration details */
ADC_DRV_ConfigConverter(ADC_INSTANCE1, &adConv2_ConvConfig0);
/* Configure ADC channel and software trigger a conversion */
ADC_DRV_ConfigChan(ADC_INSTANCE1, ADC_CHN0, &adConv2_ChnConfig0);
/* Wait for the conversion to be done */
ADC_DRV_WaitConvDone(ADC_INSTANCE1);
/* Store the channel result into a local variable */
ADC_DRV_GetChanResult(ADC_INSTANCE1, ADC_CHN0, &valorAD);
I only can read valorAD in ADC1_SE0...