I'm a newbie with LPC1778 and I'm facing a problem with ADC.
I have set ADC in single conversion mode and my acquisition routine is:
WORD ADC_GetSample(BYTE channel)
AD0CR_bit.SEL=(1<<channel); //one-hot code
AD0CR_bit.START=1; //start conversion
while (AD0GDR_bit.DONE==0); //wait for end of conversion
This works correctly it runs fast but it fails when the routine it interrupted by an interrupt or when I do a step-by-step debug in IAR.
In this two situations the DONE bit is always 0 and the wile loop never ends.
Has anyone found the same problem ?