Thread 中讨论的其他器件: UNIFLASH、 AM62P
工具/软件:
您好、
我目前使用的是 SK-AM62P-LP 电路板、使用 PSDK 版本 09.02.01.10 和 MCU+SDK 版本 09.02.01.08。
我想了解从 R5F_MCU 域到 R5F_WKUP 域的通信是否可行。 如果是、您能否分享相关的用户指南或文档?
例如、我有一个数字传感器与 R5F_MCU 连接、我想从 R5F_WKUP 域读取传感器数据。
此致、 
维拉潘迪扬五世 
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.
工具/软件:
您好、
我目前使用的是 SK-AM62P-LP 电路板、使用 PSDK 版本 09.02.01.10 和 MCU+SDK 版本 09.02.01.08。
我想了解从 R5F_MCU 域到 R5F_WKUP 域的通信是否可行。 如果是、您能否分享相关的用户指南或文档?
例如、我有一个数字传感器与 R5F_MCU 连接、我想从 R5F_WKUP 域读取传感器数据。
此致、 
维拉潘迪扬五世 
您能否在 linker.cmd 中添加以下补丁并重试:
diff --git a/examples/drivers/ipc/ipc_notify_echo/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang/linker.cmd b/examples/drivers/ipc/ipc_notify_echo/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang/linker.cmd
index d30c445..a66de26 100644
--- a/examples/drivers/ipc/ipc_notify_echo/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang/linker.cmd
+++ b/examples/drivers/ipc/ipc_notify_echo/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang/linker.cmd
@@ -165,5 +165,7 @@ MEMORY
     DDR_FS_STUB    (RWIX)      : ORIGIN = 0x9CA00000 LENGTH = 0x00008000
     /* DDR for DM R5F code/data [ size 28 MiB + 992 KB] */
     DDR                         : ORIGIN = 0x9CA08000 LENGTH = 0x1C00000
+    /* This section is used by the SBL to temporarily load the appimage for authentication */
+    APPIMAGE  : ORIGIN = 0x84000000 , LENGTH = 0x1900000 
 
 }你好 Veerapandiyan ,我很高兴你能够得到 IPC Notify 工作. 您可以按照示例更好地了解流程、但我想说主 API 是
API 列表 :AM62Px MCU+ SDK:用于 IPC Notify 的 API
谢谢您、
Paula
您好 Paula、
我阅读了 API 列表 :AM62Px MCU+ SDK:用于 IPC Notify 的 API、并尝试将消息从 MCU_R5 发送到 WKUP_R5、但 WKUP 端未接收到。
我在 WKUP 域中找不到任何用于接收消息的 API。 如有、请随时分享。
此致、
维拉潘迪扬五世
Veerapandiyan、您能告诉我您是如何测试的?
运行 OOB IPC Notify 时、您是否会在 MCU_R5 和 WKUP_R5 内核中打印如下消息?
    DebugP_log("[IPC NOTIFY ECHO] All echoed messages received by main core from %d remote cores !!!\r\n", numRemoteCores);
    DebugP_log("[IPC NOTIFY ECHO] Messages sent to each core = %d \r\n", gMsgEchoCount);
    DebugP_log("[IPC NOTIFY ECHO] Number of remote cores = %d \r\n", numRemoteCores);
    DebugP_log("All tests have passed!!\r\n");    DebugP_log("[IPC NOTIFY ECHO] Remote Core waiting for messages from main core ... !!!\r\n");
    DebugP_log("[IPC NOTIFY ECHO] Remote core has echoed all messages !!!\r\n");status = IpcNotify_registerClient(gClientId, ipc_notify_msg_handler_remote_core, NULL);
void ipc_notify_msg_handler_remote_core(uint16_t remoteCoreId, uint16_t localClientId, uint32_t msgValue, void *args)
{
    /* Echo the message back to the sender */
    IpcNotify_sendMsg(remoteCoreId, localClientId, msgValue, 1);
    /* Check if this is the last message in the sequence */
    if(msgValue == (gMsgEchoCount-1))
    {
        SemaphoreP_post(&gRemoteDoneSem);
    }
}#if defined(SOC_AM62PX)
/* main core that starts the message exchange */
uint32_t gMainCoreId = CSL_CORE_ID_WKUP_R5FSS0_0;
/* remote cores that echo messages from main core, make sure to NOT list main core in this list */
uint32_t gRemoteCoreId[] = {
    CSL_CORE_ID_MCU_R5FSS0_0,
    CSL_CORE_ID_MAX /* this value indicates the end of the array */
};
#endif嗨  Veerapandiyan ,我能够重现这个问题,即使在清理项目和删除“调试“文件夹后,我看不到打印的“msgValue"。“。 我可以看到从另一个 UART(稍后打印 Linux 引导)的“ipc_notify_msg_handler_remote_core"外部“外部打印的其他消息。 
因此、我尝试了不同的方法、并将收到的消息保存在缓冲区中、以便稍后可以打印。 这似乎正常工作。 下面的代码被截取 
位于 ipc_notify_echo.c 中
为此文件添加一些全局变量
/* Array to store received messages for analysis */ #define MAX_MSG_LOG 1000 uint32_t gReceivedMessages[MAX_MSG_LOG]; uint32_t gMsgLogIndex = 0;
将收到的消息保存在缓冲区中
void ipc_notify_msg_handler_remote_core(uint16_t remoteCoreId, uint16_t localClientId, uint32_t msgValue, void *args)
{
    /* Store message in array for later analysis (store every 1000 message to avoid overflow) */
    if(msgValue % 1000 == 0 && gMsgLogIndex < MAX_MSG_LOG)
    {
        gReceivedMessages[gMsgLogIndex] = msgValue;
        gMsgLogIndex++;
    }
    /* on remote core, we have registered handler on the same client ID and current core client ID */
    IpcNotify_sendMsg(remoteCoreId, localClientId, msgValue, 1);
    /* if all messages received then post semaphore to exit */
    if(msgValue == (gMsgEchoCount-1))
    {
        SemaphoreP_post(&gRemoteDoneSem);
    }
}
在末尾打印
void ipc_notify_echo_remote_core_start()
{
    int32_t status;
    uint32_t i;
    SemaphoreP_constructBinary(&gRemoteDoneSem, 0);
    /* register a handler to receive messages */
    status = IpcNotify_registerClient(gClientId, ipc_notify_msg_handler_remote_core, NULL);
    DebugP_assert(status==SystemP_SUCCESS);
    /* wait for all cores to be ready */
    IpcNotify_syncAll(SystemP_WAIT_FOREVER);
    DebugP_log("[IPC NOTIFY ECHO] Test - Remote Core waiting for messages from main core ... !!!\r\n");
    /* wait for all messages to be echo'ed back */
    SemaphoreP_pend(&gRemoteDoneSem, SystemP_WAIT_FOREVER);
    DebugP_log("[IPC NOTIFY ECHO] Test - Remote core has echoed all messages !!!\r\n");
    /* Print summary of stored messages */
    DebugP_log("[IPC NOTIFY ECHO] Summary of stored messages (every 1000):\r\n");
    for(i = 0; i < gMsgLogIndex && i < 10; i++)  /* Print first 10 stored messages */
    {
        DebugP_log("  Stored msg[%d] = %d\r\n", i, gReceivedMessages[i]);
    }
    if(gMsgLogIndex > 10)
    {
        DebugP_log("  ... and %d more stored messages\r\n", gMsgLogIndex - 10);
    }
}
Cortex-R5F 控制台
ðð[IPC Notify echo]测试 — 远程内核等待来自主内核的消息...!!! 
[IPC Notify echo ]测试 — 远程内核已回显所有消息!!! 
Ð[IPC Notify echo]测试 — 远程内核等待来自主内核的消息...!!! 
[IPC Notify echo ]测试 — 远程内核已回显所有消息!!! 
[IPC Notify echo]存储的消息摘要(每 1000 条): 
存储的 msg[0]= 2000 
存储的 msg[1]= 3000 
存储的 msg[2]= 4000 
存储的 msg[3]= 5000 
存储的 msg[4]= 6000 
存储的 msg[5]= 7000 
存储的 msg[6]= 8000 
存储的 msg[7]= 9000 
存储的 msg[8]= 10000 
存储的 msg[9]= 11000 
...和 988 更多存储的消息 
我没有将 Cortex-R5F 更改为主内核、但该方法应该也适用于这种情况
谢谢您、
Paula
您好 Paula、
很抱歉、延迟的回复。 
我们的理解是您仅在 MCU_R5 中发送和接收数据/消息。 我们需要实现的是从 MCU_R5 发送数据并在 WKUP_R5 中接收数据。 我们尝试以这种方式实现您的代码、但它无法正常工作。 
从 MCU_R5 发送:

2.在 WKUP_R5 收到

MCU_R5 控制台:

4. WKUP_R5 控制台:

5. Linux 引导控制台:

此致、 
Veerapandiyan 五. 
Veerapandiyan 不确定我是否理解当前的问题。
在上一篇文章中、我测试了 如何将数据/消息从 WKUP_R5F 发送到 MCU_R5F、然后循环回到。 在数组中保存 MCU_R5F 正在接收的内容、并在所有消息回显后最后打印该内容。
在测试中、我将 MCU_R5F 更改为主内核、并将 WKUP_R5F 更改为远程器件
#if defined(SOC_AM62PX)
/* main core that starts the message exchange */
//uint32_t gMainCoreId = CSL_CORE_ID_WKUP_R5FSS0_0;
uint32_t gMainCoreId = CSL_CORE_ID_MCU_R5FSS0_0;
/* remote cores that echo messages from main core, make sure to NOT list main core in this list */
uint32_t gRemoteCoreId[] = {
    //CSL_CORE_ID_MCU_R5FSS0_0,
    CSL_CORE_ID_WKUP_R5FSS0_0,
    CSL_CORE_ID_MAX /* this value indicates the end of the array */
};
#endif
以下控制台结果的屏幕截图:

我还要分享我的“ipc_notify_echo.c"。“。 我对这两个工程使用了相同的“ipc_notify_echo.c"(“(ipc_notify_echo_am62px-sk_wkup-R5fss0-0_freertos_ti-arm-clang 和 ipc_notify_echo_am62px-sk_mcu-R5fss0-0_freertos_ti-arm-clang )
e2e.ti.com/.../3515.ipc_5F00_notify_5F00_echo.c
让我知道这是否有帮助或我是否有误解
谢谢您、
Paula