I'm using the AD converter on a Stellaris LM4F232H5QD eval board, and I have configured a sample sequence to take a single sample with 12-bit resolution. I have been experimenting with the hardware oversampling and tried values of 0, 2, 4, 8 and 16. My problem is that when I initiate a sample sequence it takes quite a long time before I can read the result. The times are as follows:
0 HW OS: 7,5 us
2 HW OS: 8,8 us
4 HW OS: 12 us
8 HW OS: 15 us
16 HW OS: 23 us
I'm reading the AD value like this: (taken from the examples)
unsigned long adc_value; /* Wait until sampling is complete */ The sample sequence is configured like this:
ADCSequenceDisable(ADC0_BASE, 3); Any ideas?
/* Trigger an AD conversion */
ADCProcessorTrigger(ADC0_BASE, 3);
while(!ADCIntStatus(ADC0_BASE, 3, false)) { }
ADCIntClear(ADC0_BASE, 3);
ADCSequenceDataGet(ADC0_BASE, 3, &adc_value);
ADCSequenceConfigure(ADC0_BASE, 3, ADC_TRIGGER_PROCESSOR, 0);
ADCResolutionSet(ADC0_BASE, ADC_RES_12BIT);
ADCHardwareOversampleConfigure(ADC0_BASE, 0);
ADCSequenceStepConfigure(ADC0_BASE, 3, 0, ADC_CTL_END | ADC_CTL_IE | ADC_CTL_CH0);

