Part Number: MCU-PLUS-SDK-AM243X
Other Parts Discussed in Thread: SYSCONFIG
Hello experts,
I'm trying to use rpmessage for cross core communication.
I'll need to use an interrupt with callback for my program.
Is there any example/guideline on how to setup the constructor?
Here's what I tried:
I use this function to set the callback
RPMessage_CreateParams createParams;
RPMessage_CreateParams_init(&createParams);
createParams.localEndPt = gRemoteServiceEndPt; /* pick any unique value on that core between 0..RPMESSAGE_MAX_LOCAL_ENDPT-1
* the value need not be unique across cores
*/
createParams.recvCallback = &ISR_ipcRecvCallback; //Register receive interrupt callback function
//Callback args
gIPCArgs.obj = &gRecvMsgObject;
gIPCArgs.arg = NULL;
gIPCArgs.data = (void *) gBufIn;
gIPCArgs.dataLen = sizeof(gBufIn);
gIPCArgs.remoteCoreId = CSL_CORE_ID_R5FSS0_0;
gIPCArgs.remoteEndPt = MAIN_CORE_ACK_REPLY_END_PT;
createParams.recvCallbackArgs = &gIPCArgs;
return RPMessage_construct(&gAckReplyMsgObject, &createParams);
In the callback function I echo the received message
void ISR_ipcRecvCallback(RPMessage_Object *obj, void *arg,
void *data, uint16_t dataLen,
uint16_t remoteCoreId, uint16_t remoteCoreEndPt)
{
uint32_t status;
//echo the same message string as reply
//send ack to sender CPU at the sender end point
status = RPMessage_send(
data, dataLen,
remoteCoreId, remoteCoreEndPt,
RPMessage_getLocalEndPt(obj),
SystemP_WAIT_FOREVER);
DebugP_assert(status==SystemP_SUCCESS);
}
I modified the example "IPC RP Message Echo" provided by the SDK, but it seems that the callback function never gets called
Regards,
Andrea F,

