cancel
Showing results for 
Search instead for 
Did you mean: 

ADC conversion time

sav gas
Associate II
Posted on December 01, 2017 at 11:36

Hi,

I nedd to execute an adc conversion in STM8S003. I read that te conversion time is about 2.3us, but I see that the time in my project is about 25us. 

Configuration of  CLK_Config(void)

{

/* Initialization of the clock */

/* Clock divider to HSI/1 */

CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV1);

}

Configuration of adc

void ADC1_setup(void)

{

ADC1_DeInit();

ADC1_Init(ADC1_CONVERSIONMODE_SINGLE,

ADC1_CHANNEL_1,//ADC1_CHANNEL_0,

ADC1_PRESSEL_FCPU_D2,

ADC1_EXTTRIG_GPIO,

DISABLE,

ADC1_ALIGN_RIGHT,

ADC1_SCHMITTTRIG_CHANNEL1,

DISABLE);

ADC1_Cmd(ENABLE);

}

Clock oscillator is internal at 16Mhz

Someone can tell me where are the errors?

Thanks!

0 REPLIES 0