cancel
Showing results for 
Search instead for 
Did you mean: 

DMA setup time and interrupt latency

arunnmishra
Associate II
Posted on January 07, 2014 at 06:07

hi there, I am running an issue about using DMA to transfer data bytes from ports to internal RAM at 12MHZ. I have succeeded in doing so, but I loose first few hundred of data bytes in doing so. Can this could be a problem of DMA setup time, or should i look again over my code. I'm not using buffer mode (because I dont think it will solve the issue about 200-250 bytes of data loss).

thanks  

#dma #dma-setup-time
3 REPLIES 3
Posted on January 07, 2014 at 10:16

12 MHz is pretty quick, what processor are you using, and how is this transfer being set up? Is the transfer of a consistent/repetitive size? What's the relationship between the interrupt and the setup time? You can time the setup in machine cycles using something like the DWT_CYCCNT register.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
arunnmishra
Associate II
Posted on January 10, 2014 at 07:09

thanks clive1!I am using stm32f4 controller at 168 MHz and I receive data bytes in fix number of bytes. Initially I receive data over timer1 capture interrupt and then I configure DMA to move data to different-2 locations according to the first byte. From somewhere I remember that for stm32f4, there is 8 cycle interrupt latency, is it true? I also tried to receive data directly by DMA (without initially entering into an interrupt), but even then I loose some data . Also I dont know much about DWT_CYCCNT register. I could not find it on reference manual.

Thanks