AnsweredAssumed Answered

STM32F37x synchronizing ADC & DAC by DMA

Question asked by gerh.jo on Mar 6, 2016
Latest reply on Mar 10, 2016 by gerh.jo

Dear Community,

I am trying to find a way to synchronize DMA2_channel3 + DAC1ch1 and DMA1_Channel1 + ADC1 for analog output of a set of data via the DAC and simultaneously recording a system’s response using the ADC.  What I tried so far was to start the ADC/DMA using the  interrupt handler of DAC1ch1/DMA2ch3. This worked in 1 of 10 trials and in 9 of 10 trials the hard fault handler is triggered (BUS error). Methinks this is because I set up APB2 div @ 2 and APB1 div@1  to enable the ADC (ADC PRESC = 2) to be triggered with the same speed like APB2 devices such as the Timer used to trigger DAC1. (Page 99 http://www.st.com/st-web-ui/static/active/en/resource/technical/document/reference_manual/DM00041563.pdf).

An ideal solution would be if I could start both devices DAC and ADC at the same time. I would very happy if someone could give a hint.

Outcomes