rpmsg_lite how to avoid the conflict of cores reading and writing shared memory at the same time

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

rpmsg_lite how to avoid the conflict of cores reading and writing shared memory at the same time

跳至解决方案
856 次查看
yzs
Contributor I

hi,

     I have a question about access to shared memory in rpmsg_lite on both master and remote side, how to make sure that reads and writes don't conflict on both sides? In our ported platform, there are hardware semaphores, do we need to increase the semaphores to avoid the conflict of both cores reading and writing at the same time? If yes, where to add the semaphores in rpmsg_lite?

Thanks & Regards

yzs

标签 (1)
0 项奖励
回复
1 解答
823 次查看
Habib_MS
NXP Employee
NXP Employee

Hello @yzs,

In order to support you better, can you provide me the next information?

-MCU that you are currently using, for example MCXN947?

-MCUxpresso version.

-SDK version.

-The SDK example that you are running, for example rpmsg_lite_pingpong_cm33_core0 linked to rpmsg_lite_pingpong_cm33_core1?

BR
Habib.

在原帖中查看解决方案

0 项奖励
回复
3 回复数
824 次查看
Habib_MS
NXP Employee
NXP Employee

Hello @yzs,

In order to support you better, can you provide me the next information?

-MCU that you are currently using, for example MCXN947?

-MCUxpresso version.

-SDK version.

-The SDK example that you are running, for example rpmsg_lite_pingpong_cm33_core0 linked to rpmsg_lite_pingpong_cm33_core1?

BR
Habib.

0 项奖励
回复
789 次查看
yzs
Contributor I
Hi,
The mcu I'm using is MCXN947 and the board is frdm-MCXN947.
MCUxpresso IDE version is v24.9.
SDK version is 2.16.100.
SDK example is rpmsg_lite_pingpong_cm33_core0 linked to rpmsg_lite_pingpong_cm33_core1.
0 项奖励
回复
719 次查看
Habib_MS
NXP Employee
NXP Employee

Hello @yzs,
As mentioned in chapter 2.4 called "System Bus Priority and Arbitration" in the RM "If multiple masters attempt an access to the same slave port at the same time, then arbitration is required." In order to be able to use shared resources like a memory section, semaphores must be added, although I do not know the purpose of your hardware semaphores, you can use the peripheral called "Inter-CPU Mailbox" where it is better explained in chapter 22 of the RM. in which one of its options you can configure to MUTEX.
Also, if you experience any issue do not hesitate to let me know.
BR
Habib.

0 项奖励
回复