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",
});