Skip to main content
Visitor II
May 14, 2021
Question

problem with triple adc interleaved mode with dma

  • May 14, 2021
  • 1 reply
  • 1510 views

hi friends

i build a code with cubemx and i edited it too many times in all of them after 1 time conversion my code hanged. after all i can edit a code that countiniously works . i need to measure a fast analog signal in a specific time, for that reason i simulated that signal in a way that i produce a pwm signal and give it to a rc circuit and output is like a triangle wave.i what to sample in rise time or fall time by 7.2MSAMPLE/SEC speed in that time(2.5us and about 10 sample) . after 1 time i use HAL_ADCEx_MultiModeStart_DMA(&hadc1, (uint32_t*)num1, 10)

ten sample is almost true but it seen it is not in order, after that second time that program call

HAL_ADCEx_MultiModeStart_DMA(&hadc1, (uint32_t*)num1, 10) there is just 1 number in all of array and result is not true and repeated . i attach my code and pwm signal after rc filter.

what are my mistakes? why there is no clear datasheet about hal library ? and i search alot but i cant find a clear explain about multimode.DMAAccessMode = ADC_DMAACCESSMODE_1 ------ line

which mode i should use?

do have any good refrences?

please help -

thanks alot

    This topic has been closed for replies.

    1 reply

    ST Employee
    June 23, 2021

    Hello Akhan,

    There is an example in the HAL library about the multimode : STM32756G_EVAL/Examples.../ADC/ADC_TripleModeInterleaved

    Maybe It could be a good reference example for your application ?

    Regards,

    Simon