I have a question on how the ADCs work using ADC.h. Are the 4 ADC inputs multiplexed? Also, how do I disconnect the ADC from the pin when I'm not wanting to sample it. Does ADC_close() do that? The reasons I ask is because I see samples every 62.5kHz on the pins so it seems like it just continues to sample. I just can't seem to track it down in the code what is actually happening. I'm currently including ADC.h just like the following example from the SDK (adcsinglechannel.c). Should I be using ADCCC32XX.h instead?
/* * ======== threadFxn0 ======== * Open an ADC instance and get a sampling result from a one-shot conversion. */ void *threadFxn0(void *arg0) { ADC_Handle adc; ADC_Params params; int_fast16_t res; ADC_Params_init(¶ms); adc = ADC_open(Board_ADC0, ¶ms); if (adc == NULL) { Display_printf(display, 0, 0, "Error initializing ADC channel 0\n"); while (1); } /* Blocking mode conversion */ res = ADC_convert(adc, &adcValue0); if (res == ADC_STATUS_SUCCESS) { adcValue0MicroVolt = ADC_convertRawToMicroVolts(adc, adcValue0); Display_printf(display, 0, 0, "ADC channel 0 convert result: %d uV\n", adcValue0MicroVolt); } else { Display_printf(display, 0, 0, "ADC channel 0 convert failed\n"); } ADC_close(adc); return (NULL); }