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.

c66x can't share large data between different cores

I want to transmit large data from 0 core to 1 core by c6678evm platform. 0 core transmit data by ShareMomery and then send a notify event to 1 core. But 1 core can't receive the notify event. I want to know are there some problems in project. here is my project:

ORE0:
//C main program
char * data=(char*)0x0c000000;
Void cbFxn(UInt16 procId, UInt16 lineId,UInt32 eventId, UArg arg, UInt32 payload)
{
Semaphore_post(semHandle);
}
Void tsk0_func(UArg arg0, UArg arg1)
{
Int status;
int cnt;
for (cnt=0;cnt<1024;cnt++)
{
data[cnt]=0xff;
}
Cache_wb(data, 1024,Cache_Type_ALL, FALSE);
status = Notify_sendEvent(1, INTERRUPT_LINE, EVENTID, 0,TRUE);
Semaphore_pend(semHandle, BIOS_WAIT_FOREVER);
}
Int main(Int argc, Char* argv[])
{
Int status;
status = Ipc_start();
status = Notify_registerEvent(1, INTERRUPT_LINE, EVENTID,(Notify_FnNotifyCbck)cbFxn, NULL);
BIOS_start();
return (0);
}

//cfg main program
MultiProc.setConfig(null, ["CORE0", "CORE1"]);
/* Shared Memory base address and length */
var SHAREDMEM = 0x0C000000;
var SHAREDMEMSIZE = 0x00200000;
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
SharedRegion.setEntryMeta(0,
{ base: SHAREDMEM,
len: SHAREDMEMSIZE,
ownerProcId: 0,
isValid: true,
name: "DDR2_RAM",
});


CORE1:
//c main program
char * data=(char*)0x0c000000;
Void cbFxn(UInt16 procId, UInt16 lineId,UInt32 eventId, UArg arg, UInt32 payload)
{
Semaphore_post(semHandle);
}
Void tsk0_func(UArg arg0, UArg arg1)
{
Int status;
int cnt;
status = Notify_sendEvent(0, INTERRUPT_LINE, EVENTID, 0,TRUE);
Cache_inv(data, 1024, Cache_Type_ALL, FALSE);
for (cnt=0;cnt<1024;cnt++)
{
if(data[cnt]!=0xff)
{
System_printf("translate fail\n");
break;
}
}
}
Int main(Int argc, Char* argv[])
{
Int status;
status = Ipc_start();
status = Notify_registerEvent(0, INTERRUPT_LINE, EVENTID,(Notify_FnNotifyCbck)cbFxn, NULL);
BIOS_start();
return (0);
}
// cfg main program
MultiProc.setConfig(null, ["CORE0", "CORE1"]);
/* Shared Memory base address and length */
var SHAREDMEM = 0x0C000000;
var SHAREDMEMSIZE = 0x00200000;
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
SharedRegion.setEntryMeta(0,
{ base: SHAREDMEM,
len: SHAREDMEMSIZE,
ownerProcId: 0,
isValid: true,
name: "DDR2_RAM",
});

  • Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com). Please read all the links below my signature.

    We will get back to you on the above query shortly. Thank you for your patience.

  • Hi,
    Are you getting any failure event ?
    "translate fail"
    Not able to see the same value in shared memory region ?
  • Hi,

    Can you try the modified following code.

    Void tsk0_func(UArg arg0, UArg arg1)
    {
    Int status;
    int cnt;
    status = Notify_sendEvent(0, INTERRUPT_LINE, EVENTID, 0,TRUE);
    Semaphore_pend(semHandle, BIOS_WAIT_FOREVER); //Titus : Wait until the core1 finish its work.
    Cache_inv(data, 1024, Cache_Type_ALL, FALSE);
    for (cnt=0;cnt<1024;cnt++)
    {
    if(data[cnt]!=0xff)
    {
    System_printf("translate fail\n");
    break;
    }
    }
    }