Hello,
I have been having a heck of a time trying to recover from an ADC Conversion time overflow. My problem is not in that I am getting the error, it is trying to recover from the error. I purposely setup the sampling rate to be faster than can be supported, forcing the conversion time overflow flag. However, after I get this error, no matter how slow I setup the sampling rate afterwards, it ALWAYS generates this error until I power cycle the board.
I have it setup so that TimerB0 feeds into the ADC module, which then feeds the DMA module. I suspect the issue is after I have collected all the samples I need, I take too long to stop the timer, which then triggers another conversion that I forcibly stop.
I use the following code to force stoppage of the collection. I believe this conforms to the recommendations from the users guide:
ADC12CTL1 &= ~(ADC12CONSEQ_3); // According to users guide, to halt any conversion, need to clear these 3 bits
ADC12CTL0 &= ~(ADC12ENC); // Need to disable conversions before any other bits can be changed
while (ADC12CTL1 & ADC12BUSY);
ADC12CTL0 &= ~(ADC12ON);
TB0CTL &= ~MC_3;
Is there any noticable flaws in my logic or the order of operations?
Thanks,
-Chris