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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
857 Views
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

Labels (1)
0 Kudos
Reply
1 Solution
824 Views
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.

View solution in original post

0 Kudos
Reply
3 Replies
825 Views
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 Kudos
Reply
790 Views
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 Kudos
Reply
720 Views
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 Kudos
Reply