Page 1 of 1

Alignment of DMA memory for ADC corrupts

Posted: Mon Dec 17, 2012 11:57 pm
by bmairs
Using the ADC inputs in a model generated a dsPIC_DMA_Buffers.c file that has the following line:

Code: Select all

volatile uint16_T ADCBuffChannelDMA[(2)] __attribute__((space(dma),aligned(256)));
The problem with this is it can cause problems with other DMA uses if those aren't aligned to 256 as well. I can't think of any reason for this being necessary, can it be removed so it doesn't cause these problems?