AnsweredAssumed Answered

ADC Configuration modes for stm32F103 mcu (stm32f10x SPL)

Question asked by Eugenia Suarez on Mar 2, 2018
Latest reply on Mar 22, 2018 by Eugenia Suarez

Hi, 

 

it's my first time configuring and working with st adc peripheral. I'm using SPL libraries. 

Reading examples and datasheet there is some words and concepts that I've missunderstood.

In ex: 

If I want to use until 6 adc channels from de same adc and using scan mode. After setting the init structure I can see that this function is often used for every channel configuration: 

 

void ADC_RegularChannelConfig(ADC_TypeDef* ADCx, uint8_t ADC_Channel, uint8_t Rank, uint8_t ADC_SampleTime);

 

If I go to the header function into the spl lib you can find that Rank is:

"The rank in the regular group sequencer. This parameter must be between 1 to 16."

 

I was though that it must be the ordering value into the sequence associated with that channel. But I think that probably I'm wrong.

Could somebody answer which is exactly the meaning of rank arg?

 

Thanks in advance.

Outcomes