CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Receiving buffer address setup when using ADC to DMA

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
naughty_mark



Joined: 29 Aug 2012
Posts: 97

View user's profile Send private message

Receiving buffer address setup when using ADC to DMA
PostPosted: Tue Jan 31, 2017 5:32 pm     Reply with quote

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? Embarassed 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
Ttelmah



Joined: 11 Mar 2010
Posts: 19436

View user's profile Send private message

PostPosted: Wed Feb 01, 2017 3:57 am     Reply with quote

It's saying to put the value into the extended data space.
Realistically ask CCS. The compiler does support quite a lot of 'undocumented' settings to control things like this, and it is quite possible that it'll even accept __eds__. However the people who will know how to do this are CCS themselves. Smile
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group