This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/TMS320C6657: TMS320C6657

Part Number: TMS320C6657

Tool/software: TI-RTOS

Hello Experts,

i am facing a problem with copiying data from one location to another one.

I will give an example for understanding:

Task is to see a ramp in the buffers up/down.

in configfile app.cfg

Program.sectMap[".far:src"] = "MSMCSRAM"

Program.sectMap[".far:dest"] = "MSMCSRAM"

in file1.c:

extern far int16_t src; /*from Modul file2.c*/

#pragma DATA_SECTION(dest,".far:dest");
#pragma DATA_ALIGN(dest,64);
int16_t dest[Size];

void Task1()   //running on Core0, with lets say 100ms Cycletime

{

memcopy(src,dest,sizeof(src);

sendviaTCP(dest);

}

in file2.c

#pragma DATA_SECTION(src,".far:src");
#pragma DATA_ALIGN(src,64);
int16_t src[Size];

void Task2()/*running on Core 1 lets say 25ms Cycletime*/

{

int toggle;

if(toggle)

{

for(i=0;i<size;i++)

{

src[i]=i;

}

}

else

{

for(i=0;i<size;i++)

{

src[i]=size-i;

}

}

Toggle();

}

i tried using semaphore to prevent accidential access to the buffers in the following manner:

CSL_semAcquireIndirect(4); /*Request Semaphore 4 in Request Queue*/
do{
SemOwner=CSL_semGetResourceOwner(4); /*check if Core 1 has the sem*/
isFree=CSL_semIsFree(4); /check if sem is free*/
}while((SemOwner!=1)&&(0==isFree));

Unfortunatelly i see broken ramps, mixed up and down in one frame.

I believe its my misunderstanding in memory access, so where can i get appropriate datasheet or information please?

regards Martin