cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4: Mixed ADC configuration

keaven
Associate II
Posted on January 28, 2015 at 23:47

Hello everyone,

I have currently a system which is using ADC1/2 in dual ADC mode regular interleaved with Timer 3 TGRO and DMA.  I want to use the ADC3 regular mode with 4 channels.

Is the common initialization structure is only used for dual/triple mode or it applies also to the ADC3 in single mode?

Can we use them all on regular mode or I need to move ADC1/2 on injected mode and use ADC3 alone in regular mode?

The goal is to have ADC1/2 in dual regular interleaved external trigger or dual injected alter trigger and ADC3 4 channels in regular single mode.

Thank you

#adc #stm32f4
4 REPLIES 4
Posted on January 29, 2015 at 02:05

In Dual mode ADC1 and ADC2 are bonded. ADC3 should not be effected and should function autonomously.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
keaven
Associate II
Posted on January 29, 2015 at 15:34

Based on this commun configuration.

ADC_CommunStructure.ADC_Prescaler = ADC_Prescaler_Div2;
ADC_CommunStructure.ADC_Mode = ADC_DualMode_Interl;
ADC_CommunStructure.ADC_DMAAccessMode = ADC_DMAAccessMode_2;
ADC_CommunStructure.ADC_TwoSamplingDelay = ADC_TwoSamplingDelay_8Cycles;
ADC_CommonInit(&ADC_CommunStructure);

How the DMA will behave for the ADC3? Is it not applying to ADC3 and simply copy the data from ADC3 to memory like inADC_DMAAccessMode_Disabled ? Thank you!
Posted on January 29, 2015 at 16:38

How the DMA will behave for the ADC3? Is it not applying to ADC3 and simply copy the data from ADC3 to memory like in ADC_DMAAccessMode_Disabled  ?

 

I'd expect the ADC3->DR to behave as it always does, and *not* like reading the CDR (Common Data Register) which is what bonded ADC1+ADC2 would be using. How long could it possibly take to try this?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
keaven
Associate II
Posted on January 29, 2015 at 17:02

Ok thank you.

It will not take long time but unfortunately I am in the process on buying the compiler and right now my evaluation license is expired so might have to wait a few days ...

I will post the result once I have it.