I use IPC in DSP C6670, Core0 create massageQ and read it and core1, core2, core3 write messages to core0 in this messageQ. The problem is Core0 sometimes receives same message twice (core 0 receives more packets than the sender), I assume because collation from multiple write at the same time since if I have only one writes there is no problem.
I used gateMP, by including header file and defined in cfg. I understand that gateMP already in messageQ and not need to start. My IPC section in cfg is
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
/*
* Get the list of names that the build device supports.
* I.e. ["CORE0", "CORE1", "CORE2" ... ]
*/
var nameList = MultiProc.getDeviceProcNames();
/*
* Since this is a single-image example, we don't (at build-time) which
* processor we're building for. We therefore supply 'null'
* as the local procName and use MultiProc_setLocalId to set the procId
* at runtime.
*/
MultiProc.setConfig(null, ["CORE0", "CORE1", "CORE2"/*, "CORE3"*/]);
var SysStd = xdc.useModule('xdc.runtime.SysStd');
System.SupportProxy = SysStd;
/* Modules explicitly used in the application */
var Settings = xdc.module('ti.sdo.ipc.family.Settings');
var MessageQ = xdc.module('ti.sdo.ipc.MessageQ');
var Notify = xdc.module('ti.sdo.ipc.Notify');
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
var listMp = xdc.useModule('ti.sdo.ipc.ListMP');
var GateMP = xdc.useModule('ti.sdo.ipc.GateMP');
Notify.SetupProxy = xdc.module(Settings.getNotifySetupDelegate());
MessageQ.SetupTransportProxy= xdc.module(Settings.getMessageQSetupDelegate());
/* Use shared memory IPC */
Notify.SetupProxy = xdc.module('ti.sdo.ipc.family.c647x.NotifyCircSetup');
MessageQ.SetupTransportProxy = xdc.module('ti.sdo.ipc.transports.TransportShmNotifySetup');
/* Synchronize all processors (this will be done in Ipc_start) */
Ipc.procSync = Ipc.ProcSync_ALL;
/* Shared Memory base address and length */
var SHAREDMEM = 0x98000000;
var SHAREDMEMSIZE = 0x00700000;
/*
* Need to define the shared region. The IPC modules use this
* to make portable pointers. All processors need to add this
* call with their base address of the shared memory region.
* If the processor cannot access the memory, do not add it.
*/
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
SharedRegion.translate = false;
SharedRegion.setEntryMeta(0,
{ base: SHAREDMEM,
len: SHAREDMEMSIZE,
ownerProcId: 0,
isValid: true,
cacheEnable: true,
cacheLineSize: 128, /* Aligns allocated messages to a cache line */
name: "MSMCSRAM_IPC",
createHeap: true,
});
I used IPC 1.25.3.15 and sys/Bios 6.35.1.29.
Can anybody help me to solve this problem?