cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F303 ADC Simultaneous 4 ADC sampling

USakt
Associate

Hello ,

I have recently bought a Nucleo-144 with an STM32F303ZE . Ive been testing out basic programmes including ADCs and I am new to STM32 and embedded in general .

Problem:

I need to sample 4 channel input Intermediate Frequency(2MHz signal , and i need to sample it at a min of 5MSPS ) data with 0 or very minimal time delay between each individual ADC. Once I get (say a 1000 or so simultaneous samples of 8 bit data ) them , I dont mind the delay of transferring them over serially.

So I figured that an MCU with 4 independent ADCs would do it. I am currently using CubeMx with Keil(HAL libraries ) .

I have a couple of noobish idea oft this , but i cannot figure out the SIMULTANEOUS part

  1. Initialize the 4 ADCs -> Use a trigger to start conversion and read the data at my leisure
  2. Use DMA on 2 x Dual regular simultaneous mode.
  3. Initialize the 4 ADCs , read the values 1 by one , throw away the initial x samples and last y samples of data ( a detailed timing diagram of the ADCs would really help)

Whatever I do I can think only sequentially which will cause a delay between readings ( Ex : polling the ADCs 1 by 1 will cause a delay . Or is there an interrup which will stop all the ADCs simultaneously?)

Ive looked around and found very few / no examples of multiple ADCs running simultaneously.Just multi channels

A couple more questions :

  1. What is the simultaneous sample and hold function of the ADCs ( i guess I can simultaneously sample the data , I convert it at my leisure )

2.HAL_ADC_Start_DMA(&hadc2,adc_val2,10);

HAL_ADC_Start_DMA(&hadc1,adc_val,10);

Although I have initialized both ADCs in independent mode with all the settings same , when I run the code above , the system just updates the hadc2 values and the ADSTART register of the other ADC is 0. Do in need to interrupt it somehow?

Kindly explain it in noobish terms if possible. I apologise for any breach in forum rules / etiquette / noobish stuff in general .

Thank you

0 REPLIES 0