cancel
Showing results for 
Search instead for 
Did you mean: 

adc stm32f1 interleaved

elec_st
Associate III
Posted on March 16, 2017 at 15:05

i use stm32f103 mcu with adc1 adc2 adc3 and i want to use adc in interleaved to increase sample from 1msps to 3msps. i search on google and in all code example and i can't find how to use  adc in interleaved

4 REPLIES 4
Posted on March 16, 2017 at 16:11

Are you tied to the F1? I don't think it supports a triple interleave mode.

The interleave on the F1 pairs ADC1 and ADC2 with a 7 or 14-cycle slew between them, and a DMA from a 32-bit wide data register.

Look at this for a template

STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\ADC\RegSimul_DualMode\main.c

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Imen.D
ST Employee
Posted on March 16, 2017 at 17:02

Hello,

You can take a working

ADC_Regular_injected_groups 

example as start point to make required updates according to your needs, this can help you as an implementation example:

STM32Cube_FW_F1_V1.4.0\Projects\STM3210C_EVAL\Examples\ADC\ADC_Regular_injected_groups

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
elec_st
Associate III
Posted on March 17, 2017 at 12:24

  i  have problem

i select dual fast interleaved  delay between sample 7 clock

and the STM32CubeMX give me this code

MX_GPIO_Init();

MX_DMA_Init();

 MX_ADC1_Init();

 MX_ADC2_Init();

  MX_UART4_Init();

the problem in   MX_ADC2_Init(); it's make stm32f103 stop working and hang and mcu look like dead.

elec_st
Associate III
Posted on March 21, 2017 at 19:27

i solve this probelm to use adc in  interleave mode .

because stm32cube use  this two function

 MX_ADC1_Init();

 MX_ADC2_Init();

 and   MX_ADC2_Init(); return with error

when i see examples code in STM32F10x_StdPeriph

it use ADC_Config(); and this work fine with me

so the problem in  stm32cube