i.MX8QXP RPMsg communication between M4 and A35 cores

cancel
Showing results for 
Search instead for 
Did you mean: 

i.MX8QXP RPMsg communication between M4 and A35 cores

Jump to solution
2,580 Views
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 Solution
457 Views
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

6 Replies
457 Views
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 Kudos
458 Views
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

457 Views
Contributor III

Dear Igor,

Thank You for the update. 

That worked for me.

Regards,

Ajmal

0 Kudos
457 Views
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 Kudos
457 Views
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 Kudos
457 Views
Contributor I

Hi ajmalali

The test program worked for me.

Thanks.

Regards,

Yu

0 Kudos