AnsweredAssumed Answered

ADC glitches

Question asked by MA on Sep 24, 2011
Latest reply on Sep 27, 2011 by Leek1001
I have 1kohm potentiometer connected on pin PC4. On the sam pin oscilloscope is connected . Everything is correctly grounded and supplyed. On the scope (attached picture) I see 100mV glitches with a frequency of ADC conversion time (when I change sampling time the frequency changes also). Does anyone have the same problem? Is there a mistake in my code or with my board or is that "normal"?

I hope that someone can offer a solution or an explanation.


   RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1 | RCC_APB2Periph_GPIOC, ENABLE);
   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4;
   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
   GPIO_Init(GPIOC, &GPIO_InitStructure);

   ADC_InitStructure.ADC_Mode = ADC_Mode_Independent;
   ADC_InitStructure.ADC_ScanConvMode = DISABLE;
   ADC_InitStructure.ADC_ContinuousConvMode = ENABLE;
   ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_None;
   ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;
   ADC_InitStructure.ADC_NbrOfChannel = 1;
   ADC_Init(ADC1, &ADC_InitStructure);

   ADC_RegularChannelConfig(ADC1, ADC_Channel_14, 1, ADC_SampleTime_55Cycles5 );




   ADC_SoftwareStartConvCmd(ADC1, ENABLE);