Hi all, I am having a few issues with the ADC in an existing project (initial code works great but am having issues with adding another ADC input). I am inclined to work a bit more on the issue on my own before posting code here. But I do have a few questions on the ADC that I haven't had clarified in the reading and searching I've done.
1. Is it necessary to have an ISR for the ADC if I am only using the ADC interrupt in the while statement in the adc read function?
while(!ADCIntStatus(ADC0_BASE, 3, false)) { }
It has worked fine before adding my second ADC input.
2. Can the ADC inputs set up with ADCSequenceStepConfigure be out of order, i.e.
ADCSequenceStepConfigure(ADC0_BASE, 3, 0, ADC_CTL_CH0);
ADCSequenceStepConfigure(ADC0_BASE, 3, 1, ADC_CTL_CH2);
ADCSequenceStepConfigure(ADC0_BASE, 3, 2, ADC_CTL_CH1 | ADC_CTL_IE | ADC_CTL_END);
3. Does single use ADC input pins (such as PE3/AIN0 pin 6 on the TM4C1230E6PM) have to be declared with a GPIOPinTypeADC in setup?
4. Can the ADC input pins be configured with GPIOPinTypeADC prior to executing SysCtlPeripheralEnable for the ADC?
Thanks for the help, if I continue to stay stuck I will start another thread.