Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
Hello,
I am having trouble getting the ipc_test to work between the A53 core(s) running QNX, and the R5 DM core running FreeRTOS. This is on a custom board. I had previous success running the same test using the AM62A EVK.
On the DM (FreeRTOS) side:
1. I enabled IPC via SysConfig:

2. Ensured that the IPC vring buffer was declared in my linker.cmd
MEMORY
{
// ..
IPC_VRING_MEM : ORIGIN = 0xA0000000 , LENGTH = 0x01000000
// ..
}
3. Applied this patch from the QNX PSDK: mcu_plus_sdk_qnx_ipc_am62a.patch (except for linker.cmd section because it was aready present and correct for my board)
4. Added some of the code (using the ipc_rpmsg_echo_qnx example from mcu_plus_sdk_am62ax_09_02_00_38 as a reference) into a new IPC task that starts on boot:
void ipc_rpmsg_echo()
{
// RPMessage_Params cntrl_prm;
RPMessage_CreateParams create_params;
char recv_msg[MAX_RPMSG_SIZE];
volatile int i = 0;
uint32_t remote_core_end_pt;
int32_t status;
uint16_t recv_msg_sz, remote_core_id;
// Let Main core boot before trying any IPC stuff
appRtosTaskSleepInMsecs(30000);
/* Create message params */
IPC_LOG("Creating RPMessage params...\r\n");
RPMessage_CreateParams_init(&create_params);
create_params.localEndPt = gRemoteServiceEndPt;
/* Set message params */
status = RPMessage_construct(&grecv_msgObject, &create_params);
DebugP_assert(status==SystemP_SUCCESS);
IPC_LOG("RPMessage initialized!\r\n");
/* Announce endpoint */
IPC_LOG("Announcing RPMessage endpoint...\r\n");
status = RPMessage_announce(CSL_CORE_ID_A53SS0_0, gRemoteServiceEndPt, "ti.ipc4.ping-pong");
DebugP_assert(status==SystemP_SUCCESS);
/* Listen for messages */
while (1)
{
/* Wait for a message */
IPC_LOG("Waiting for next message...\r\n");
recv_msg_sz = sizeof(recv_msg);
status = RPMessage_recv(&grecv_msgObject,
recv_msg, &recv_msg_sz,
&remote_core_id, &remote_core_end_pt,
SystemP_WAIT_FOREVER);
DebugP_assert(status==SystemP_SUCCESS);
IPC_LOG("Message %d received\n", i);
/* Echo the message back */
status = RPMessage_send(
recv_msg, recv_msg_sz,
remote_core_id, remote_core_end_pt,
RPMessage_getLocalEndPt(&grecv_msgObject),
SystemP_WAIT_FOREVER);
DebugP_assert(status==SystemP_SUCCESS);
IPC_LOG("Message %d acknowleged\n", i++);
}
}
void ipc_task_main(void* arg0, void* arg1)
{
IPC_LOG("Starting IPC Task!\r\n");
ipc_rpmsg_echo();
TaskP_exit();
}
Upon DM bootup, I see my task start, wait, announce it's endpoint to the A53, and then wait for messages. UART logs:
##DM Built On: Aug 8 2024 15:09:17
##Sciserver Version: v2024.03.0.0-REL.MCUSDK.09.02.00.38+
##RM_PM_HAL Version: v09.02.07a
##Starting Sciserver..... PASSED
[2.001579] Starting IPC Task!
[32.001246] Creating RPMessage params...
[32.007356] RPMessage initialized!
[32.010469] Announcing RPMessage endpoint...
# Below are some logs I added to the ipc_rpmsg driver
Announcing local endpoint 14:ti.ipc4.ping-pong to remote core with ID 2
Sending announcement message...
Emptying vring tx buffer...
Vring tx buffer emptied!
Got RPMessage_Core for coreID=2
Got RPMessage_Vring (9CEA4A60) for coreID=2
Num buffers in vring 256, looking for vring buffer at idx 0
Got vringTxBufAddr for vringBufId=0
Got vring buffer address: 9CDC2D80
Got vring buffer length: 2631675264
Defining message header...
Copying message into vring buffer...
Posting 56 byte message...
Message posted!
[32.060818] Waiting for next message...
On the A53 (QNX) side:
1. I ensure that tiipc-mgr is running, and that the vring buffer address and size match:
user@QNX:/# ps -A | grep tiipc
200722 ? 00:00:00 tiipc-mgr
user@QNX:/# slog2info | grep tiipc
Jan 01 00:00:02.450 tiipc_mgr.200722 slog* 57 TI IPC resmgr for SOC AM62A (version=, date=Thu Aug 8 14:52:53 PDT 2024)
Jan 01 00:00:02.450 tiipc_mgr.200722 slog 57 tiipc-mgr: Starting TI IPC Resmgr
Jan 01 00:00:02.450 tiipc_mgr.200722 slog 57 tiipc-mgr: Using VRING base address: 0xa0000000, size:0x1000000
Jan 01 00:00:02.451 tiipc_mgr.200722 slog 57 [IPC]
Jan 01 00:00:02.451 tiipc_mgr.200722 slog 57 Mailbox_plugInterrupt: interrupt Number 108, arg 0x9D687518
Jan 01 00:00:02.451 tiipc_mgr.200722 slog 0 MAILBOX: Mailbox Driver (1a9d687348) open successful.
Jan 01 00:00:02.451 tiipc_mgr.200722 slog 57 [IPC]
Jan 01 00:00:02.451 tiipc_mgr.200722 slog 57 Mailbox_plugInterrupt: interrupt Number 109, arg 0x9D687738
Jan 01 00:00:02.451 tiipc_mgr.200722 slog 0 MAILBOX: Mailbox Driver (1a9d6873b8) open successful.
Jan 01 00:00:02.451 tiipc_mgr.200722 slog 57 [IPC]
Jan 01 00:00:02.451 tiipc_mgr.200722 slog 57 Mailbox_plugInterrupt: interrupt Number 140, arg 0x9D687958
Jan 01 00:00:02.451 tiipc_mgr.200722 slog 0 MAILBOX: Mailbox Driver (1a9d687428) open successful.
2. I start the ipc_test before the DM announces itself (that is the reason for the 30 second delay on DM side)
user@QNX:/# ipc_test -v IPC_echo_test (core : mpu1_0) ..... responderFxn will stay active. Please use ctrl-c to exit the test when finished. RecvTask: Start! SendTask 1: Start! SendTask 2: Start! SendTask 3: Start! SendTask 1: Planning to send 10 messages on endpoint 14:ti.ipc4.ping-pong SendTask 1: Getting remote enpoint... SendTask 2: Planning to send 10 messages on endpoint 14:ti.ipc4.ping-pong SendTask 2: Getting remote enpoint... SendTask 3: Planning to send 10 messages on endpoint 14:ti.ipc4.ping-pong SendTask 3: Getting remote enpoint...
Result: The A53 side hangs on the call to RPMessage_getRemoteEndPt, and never receives the DM's announcement, even though on the DM side everything appears to have succeeded.
I have spent many hours debugging this, but so far have not come up with a solution. Any guidance or debug tips are appreciated!
Thanks in advance,
Evan Meirink
