cancel
Showing results for 
Search instead for 
Did you mean: 

Understanding some ADC instructions in STM32 F4

samykobbi
Associate
Posted on January 20, 2016 at 19:15

I am trying to program an adc in stm32f4. I want to know what are the roles of these five instructions?

  ADC_CommonInitStructure.ADC_Mode = ADC_Mode_Independent;

  ADC_CommonInitStructure.ADC_Prescaler = ADC_Prescaler_Div2;

  ADC_CommonInitStructure.ADC_DMAAccessMode =        ADC_DMAAccessMode_Disabled;

ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;

0

http://stackoverflow.com/questions/34907325/understanding-some-adc-registers♯

I am trying to program an adc in stm32f4. I want to know what are the roles of these five instructions?

0

http://stackoverflow.com/questions/34907325/understanding-some-adc-registers♯

I am trying to program an adc in stm32f4. I want to know what are the roles of these five instructions?

0

http://stackoverflow.com/questions/34907325/understanding-some-adc-registers♯

I am trying to program an adc in stm32f4. I want to know what are the roles of these five instructions?

0

http://stackoverflow.com/questions/34907325/understanding-some-adc-registers♯

I am trying to program an adc in stm32f4. I want to know what are the roles of these five instructions?

0

http://stackoverflow.com/questions/34907325/understanding-some-adc-registers♯

I am trying to program an adc in stm32f4. I want to know what are the roles of these five instructions?

#stm32-adc
2 REPLIES 2
Posted on January 20, 2016 at 19:34

Or even just four of them.

Independent, not tied to any other ADCx unit

Prescaler, dividing down the clock from the APB/AHB to which it is attached. It will be units of this divided clock that the sample and conversion will be performed. A 12-bit conversion taking 12 cycles, plus whatever sample cycle are specified.

DMA Access mode, defines the behaviour/ordering of the data supplied in response to a DMA request when multiple ADCx units are used. Not used here.

Data Alignment, defines if the data is shifted into the top or bottom portion of the register. For right aligned, 12-bit data, the top 4 high order bits would be zero.

I'm sure the Reference Manual describes and diagrams many of these things.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
webmaster
Associate II
Posted on August 10, 2016 at 11:03

Hello

Is possible, to config ADC1, ADC2 and ADC3  of mode independent?

i.e. ADC3, in mode scan whith DMA PA0, PA1, PA2 and  PA3. resolution 8bits.

ADC1 in mode independent. for canals 16,17 and 18. request information this ADC1 channels every 5 sec.

AD2 Interruption request information with 10bits resolution.