i.MX8QXP RPMsg communication between M4 and A35 cores

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

i.MX8QXP RPMsg communication between M4 and A35 cores

跳至解决方案
8,924 次查看
ajmalali
Contributor III

Hi,

I am trying to set up multicore communication using RPMsg in IMX8QXP, in which freertos is running in M4 core and linux in A35. I am using the 'rpmsg_lite_str_echo_rtos' example from NXP FreeRTOS SDK 2.3. I was successfully able to create virtual tty '/dev/RPMSG'. Also i was able to send data to M4 core using 'echo' command from linux, and readback the acknowledgement at A35.

Now i want to use this same channel to pass data from Linux continuously to M4 (and read the acknowledgements). What I am looking for, is a simple userspace application in c using basic open, read, write commands to pass data from A35 to M4.

I tried this and got the results below : 

  • The code works fine for a single write instruction.
  • When i continuously write to the channel, i get some junk data in between at M4. Also the linux part becomes slow (I am trying to read data after each write to free the buffer).
  • The read part in linux is not at all working. The C code gets blocked whenever a read instruction is used (Even when i am using NONBLOCK mode).
  • If there is only a single write instruction, and i put a delay after it, same thing occurs (M4 receives junk data while the linux is in delay loop).

I also tried using fopen, fwrite, fflush, fread commands with same results.

I am only using the basic open, read write commands. Am i missing something here? Please help.

please revert back if you need any more details.

Regatds,

Ajmal

1 解答
6,800 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Ajmal

for simple rpmsg testing one can try unit-test and attached Linux Manual

sect.9.19 Remote Processor Messaging:

rpmsg\test - imx-test - i.MX Driver Test Application Software 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

7 回复数
6,800 次查看
dusancervenka-b
NXP Employee
NXP Employee

Hi ajmalali‌,

maybe i am offtopic but regarding to speed in RPMSG you can read thread here Increasing transfer speed between cores · Issue #20 · EmbeddedRPC/erpc · GitHub  start with ablaylock answer.

0 项奖励
6,801 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Ajmal

for simple rpmsg testing one can try unit-test and attached Linux Manual

sect.9.19 Remote Processor Messaging:

rpmsg\test - imx-test - i.MX Driver Test Application Software 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

6,800 次查看
ajmalali
Contributor III

Dear Igor,

Thank You for the update. 

That worked for me.

Regards,

Ajmal

0 项奖励
6,800 次查看
chengyuhao
Contributor I

hi, ajmalali,

how are your problems been solved ?

I'm using a imx7d board, i want to send a int value from m4 to a7 and read it at a7 side.

I also use open, write,read commands, 

but, m4 side print junk message and a7 side get nothing, just in blocking.

could you give me some advice ?

Regards,

Yu

0 项奖励
6,800 次查看
ajmalali
Contributor III

Hi Yu,

The above test program that igor shared worked for me. Have you tried that?

Have you figured out where the problem is? ie. M4 or A7 side?

Also, just for clarity are you using bare metal application in the m4 side or do you have FreeRTOS or something similar in M4 core?

I started from the RPMsg application from the SDK by NXP and it worked for me.

You can get the SDK from here,

Welcome | MCUXpresso SDK Builder 

Regards,

Ajmal

0 项奖励
6,801 次查看
chengyuhao
Contributor I

Hi ajmalali

The test program worked for me.

Thanks.

Regards,

Yu

0 项奖励
388 次查看
arunsathian
Contributor III
Hi @ajmalali,

Iam using i.MX8QXP processor.Can you please guide me how to enable rpmsg in A35 core and M4 core.please share the documents related to it.
0 项奖励