cancel
Showing results for 
Search instead for 
Did you mean: 

EOC not set when attempting to manually read ADC

CanisSomnolentus
Associate III
Posted on September 23, 2010 at 11:09

EOC not set when attempting to manually read ADC

1 REPLY 1
CanisSomnolentus
Associate III
Posted on May 17, 2011 at 14:08

Strange:

I first change these things:

Instead of using ADC_SoftwareStartConvCmd(ADC1, ENABLE);

I changed code to:

ADC1->SR = ~(u32)ADC_FLAG_EOC;

ADC1->CR2 |= 0x1; // ADC Messung starten

and there this: 

 // Wait until conversion completion

 //while(ADC_GetFlagStatus(ADC1, ADC_FLAG_EOC) == RESET);

//

 while(ADC1->SR & ADC_FLAG_EOC == 0); Then this seemed to work, it got through the loop...

But I changed back the code to the lib functions,

and now that works, too, like from what I remember to have been the case yesterday!

(I did clear target, build all, and manually uploaded to device, just to be sure!)

This is rather odd.