8 years, 3 months ago.

Synchronizing dma with adc lpc1768

I am working in an impedance analycer. I generate a sine wave using DAC and measuring with ADC and applying FFT. The DAC is working with MODDMA and the adc is interrupt triggered using the library FastAnalog. The way I synchronizing both is, attaching the adc interrupt with the dma callback.

void custom_callback(void)
{
    if(ready == 1) {               //To avoid reattaching the interrupt
        ready = 0;
        samplingTimer.attach_us(&samplingCallback, 5);
    }
}

I also have in my code:

BusOut nouse(p16,p17,p19,p20,P0_2,P0_3);
mbed_interface_disconnect();

The systems works well, but the standard deviation in the angle is 0.5 and I want to improve this.

Anyone can help me?

posted by Sergio Fernandez Santos 10 Aug 2016
Be the first to answer this question.