naughty_mark
Joined: 29 Aug 2012 Posts: 97
|
Receiving buffer address setup when using ADC to DMA |
Posted: Tue Jan 31, 2017 5:32 pm |
|
|
Hi Guys,
I am using dsPIC33ECP512MU814 micro with CCS compiler v5.0.30.
What I am trying to do is read 8 ADC channels (4 channels Simultaneously each time) and let DMA fill those readings to my buffer. I read Microchip User Manual Section 22 about DMA for this chip, following its example code. However, the address of receiving buffer needs to be setup properly, and I have example code below:
Code: |
__eds__ unsigned int BufferA[32] __attribute__ ((eds,space(dma)));
DMA5STAL = __builtin_dmaoffset(BufferA);
DMA5STAH = 0x0000;
|
I would like to know for interpret those code into CCS format, what should I write? I understand if variable needs to align with some address such as Code: | unsigned int dmaBufferA[32] __attribute__((aligned(0x1000))); |
But I don't understand what "eds" mean, and how to interpret things like "eds", "space(dma)", "builtin_dmaoffset".....
Could anyone help?
Regards
Mark |
|