2016-09-03 12:02 AM
I use DAC with DMA to ouput a sine wave. The DAC is triggered from exti9. It can output a perfect sine wave now. But I want to sync the wave's zero-crossing with a pin's rising edge. So, I put the start signal in the rising edge interrupt handler. And make my sine table starting from 0. But when I probing the DAC output and the rising edge signal, I found sometimes the DAC output is apparently delayed to the rising edge, sometime the delay is about 10ms!!!! So, is it normal to use DMA with DAC?
#dma-dac2016-09-03 12:09 AM
I've used the F4's DAC as a DMA-driven digital synthesizer before (for sine waves, amongst other things). I certainly didn't see any mysterious 10ms delays.
EXTI9 shares an interrupt vector with EXTI8..EXTI5, and is by no means the highest priority interrupt. Is it possible that other interrupts are interfering with your DAC/DMA startup, either due to higher priorities or polling in the shared EXTI9_5 vector?