Hi there,
i need to allocate memory for two data arrays. My project consists of a header file, which includes all variables and arrays I am using within the project.
For allocating the memory for my arrays, I took a look at the Example_2834xMcBSP_DLB_DMA.c example for my TMS320C28346.
There, memory is allocated like this:
#pragma DATA_SECTION(sdata, "DMARAML4")
#pragma DATA_SECTION(rdata, "DMARAML4")
Uint16 sdata[128]; // Sent Data
Uint16 rdata[128]; // Recieved Data
I am trying to allocate my arrays like:
#pragma DATA_SECTION(ADCbuffer1,"DMARAML4");
#pragma DATA_SECTION(ADCbuffer2,"DMARAML4");
volatile Uint16 ADCbuffer1[512];
volatile Uint16 ADCbuffer2[512];
All I am getting is a warning "pragma can only be applied to a file level symbol, but not 'ADCbuffer1'".
Furthermore my memory is not where I need it to be (it need's to be DMA accessible), but anywhere else.
How can I allocate the arrays in DMARAML4? And furthermore, how can I get channel1 of the DMA to switch between those two arrays?
Thank you very much in advance!
Johannes Miersch