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.

[参考译文] RTOS/AWR1642BOOST:邮箱项目

Guru**** 2576195 points
Other Parts Discussed in Thread: MMWAVE-SDK

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/641995/rtos-awr1642boost-mailbox-project

器件型号:AWR1642BOOST
Thread 中讨论的其他器件:MMWAVE-SDK

工具/软件:TI-RTOS

我想使用邮箱在 ARM 和 DSP 之间进行通信、但是当 ARM 写入邮箱时、新消息标志未设置、并且 DSP 无法通过 while 循环读取邮箱中的消息。

ARM 上的代码:

//

//邮箱初始化
mailbox_init (mailbox_type_MSS);

//设置邮箱
Mailbox_Config_init (.cfg);
cfg.readMode = mailbox_mode_callback;
cfg.readCallback = test_callback;

//打开 DSS 实例
handleDss = Mailbox_open (mailbox_type_dss、&cfg、&errCode);
if (handleDss ==空)

printf ("MSS:错误:无法打开 DSS 的邮箱");
返回;

if (错误代码!=0)

printf("MSS:错误:无法打开邮箱实例。 error=%d\n",errCode);
返回;

printf ("MSS:DSS %p 的邮箱实例已成功打开\n"、handleDss);


//向 DSS 写入并发送混乱消息
Mmess=2000;
printf ("MSS:DSS %p 的邮箱实例已成功打开\n"、handleDss);

size = Mailbox_write (handleDss、(uint8_t*)&mess, sizeof (mess));
printf ("MSS:收到来自 DSS 的 ACK \n");
if (size!= sizeof (mess))

printf ("MSS:写入 MBX 失败");

//

DSP 上的代码:

//

mailbox_init (mailbox_type_dss);

//设置邮箱
Mailbox_Config_init (.cfg);
cfg.readMode = mailbox_mode_callback;
cfg.readCallback = test_callback;

//打开邮箱通道
Handle = Mailbox_open (mailbox_type_MSS、.cfg、errCode);


if (handle == NULL)

System_printf ("dss:错误:无法打开邮箱实例\n");
返回;

if (错误代码!= 0)

System_printf ("DSS:错误:无法打开邮箱实例。 error=%d\n",errCode);
返回;

System_printf ("dss:邮箱实例%p 已成功打开\n"、句柄);

System_printf ("dss:********** 正在等待来自 MSS 的消息1 ************* \n");

/*等待回拨以设置标志*/
while (testAppCallbackFlag_DSS = 0)

Task_sleep (100);

System_printf ("DSS:消息1已接收。\n");

//读取混乱
mess_Rx = 0;
size = Mailbox_read (handle,(uint8_t*))&mess_Rx,sizeof (mess));
if (size!= sizeof (mess))(如果(大小!= sizeof (mess))))

System_printf ("dss:读取错误。\n");

//

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你好,Minh Nguyen van,

    您是否在使用 MSS 到 DSS 消息交换的测试应用程序 MMWAVE-SDK 中引用了代码?

    请参阅 MMWAVE-SDK 中$MMWAVE_SDK_01_01_00_02\packages/ti\drivers\mailbox\test\xwr16xx\test_mss_dss_msg_exchange 中的测试应用程序。 此代码针对 MSS 和 DSS 之间的消息交换进行了验证。

    谢谢、

    Raghu

    ------------------------------------------------------

    如果您的问题得到了解答、请单击此帖子上的"验证答案"按钮。

    ------------------------------------------------------