Dear sir,
I have a code fragment as below in my application.
/*****************************************************************/
ADC0FLWCTL_RSTA = 1u;
while (ADC0CONIF_1_EOL_IF == 0u)
{
//_asm("NOP");
Variable1= ADCResult[0]; /*read data from RVL*/
Variable2= ADCResult[1];
}
/*****************************************************************/
When the loop is exited(all ADC commands were completed, EOL_IF was set), I could get valid Variable1, however, the Variable2 was mostly invalid.
I inserted a "NOP" to the loop, then I could get all data.
I suspect it is caused by ADC timing and data consistency, but I don't have a clear understanding about that.
Could you tell me the probably reason behind this ?
Thanks very much.