Skip to main content
AKhot.1
Associate III
July 13, 2023
Question

4 ADCs simultaneous sampling

  • July 13, 2023
  • 6 replies
  • 2499 views

Is it possible to use 4 ADC input channel and sample them simultaneously in any of the STM32 product on a single board?

    This topic has been closed for replies.

    6 replies

    MasterT
    Lead II
    July 13, 2023

    No. To sample 4 analog inputs at ones you need 4 ADC, check out nucleo-G474re

    Piranha
    Principal III
    July 13, 2023

    You are saying that it's impossible and then immediately suggesting a device, which can do it...

    raptorhal2
    Lead
    July 13, 2023

    The F303 also has 4 ADCs.

    Tesla DeLorean
    Guru
    July 13, 2023

    As I recall this could be done on the F3-DISCO board. ie ADC1 and 2, and ADC3 and 4, could be paired and synchronized with a common clock trigger. Data Buffering perhaps not ideal, but could be managed.

    https://www.st.com/en/evaluation-tools/stm32f3discovery.html

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    AKhot.1
    AKhot.1Author
    Associate III
    July 20, 2023

    I know how to operate ADC1 and ADC2 together similarly this will work for ADC3 and ADC4. But how to do all 4 simultaneously? You said we can do that by common clock trigger. 

    Do you have example for that? Or do you know how to do that?

    MasterT
    Lead II
    July 20, 2023

    Simply set the same event to trigger all ADC.

    hadc1.Init.ExternalTrigConv = ADC_EXTERNALTRIG_T1_TRGO;

    Here is an example for G-474, search another one for your uCPU

    https://github.com/STMicroelectronics/STM32CubeG4/blob/master/Projects/B-G474E-DPOW1/Examples/ADC/ADC_GainCompensation/Src/main.c