AnsweredAssumed Answered

ADC Resolution

Question asked by johnsmith on Aug 8, 2014
Latest reply on Aug 8, 2014 by Clive One
ADC resolution 12 bits(with 16 bit buffer) works but 8 bit(with 8bit buffer) results in the code going into an infinite loop in the DMA ISR. 

__IO uint8_t buffer[1000];
/* ADC Config*/
  ADC_StructInit(&ADC_InitStructure);
  ADC_InitStructure.ADC_Resolution = ADC_Resolution_8b;
  ADC_InitStructure.ADC_ScanConvMode = DISABLE;
  ADC_InitStructure.ADC_ContinuousConvMode = DISABLE;
  ADC_InitStructure.ADC_ExternalTrigConvEdge = ADC_ExternalTrigConvEdge_Rising;
  ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_T3_TRGO;
  ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;
  ADC_InitStructure.ADC_NbrOfConversion = 1;
  ADC_Init(ADC1, &ADC_InitStructure);
  ADC_RegularChannelConfig(ADC1, ADC_Channel_1, 1, ADC_SampleTime_192Cycles);

Outcomes