RPMsg example question

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

RPMsg example question

218 Views
dougbaker
Contributor III

I am using a IMX8 with a A53 and a M7.  The M7 code is built with VSCode and MCUXpresso environment.  The M7 runs Free RTOS and I have the M7 running example projects.  I have the example “multicoe_examples/rpmsg-lite-str-echo-rtos-remote”  running but I have some questions about it.

On a fresh boot, it generally works when I can sent messages from the A53 to the M7.  If I restart jut the M7 CPU, the messages do not The messages only work after a full reset including the A53.  When rebooting justthe m7 core, the M7 fails on the following call: rpmsg_lite_is_link_up(my_rpmsg);

 

Is there a example or recommended way to implement 2 endpoints between the A53 and the M7?  How should two endpoints between the two cores be implemented?

 

Am I asking this question in the right forum?

Thanks,

Doug

0 Kudos
Reply
5 Replies

140 Views
dougbaker
Contributor III

echo start > /sys/class/remoteproc/remoteproc0/state^C

0 Kudos
Reply

141 Views
dougbaker
Contributor III
echo start > /sys/class/remoteproc/remoteproc0/state
0 Kudos
Reply

151 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @dougbaker 

How did you load the M7? Using Linux remoteproc sysfs or U-Boot commands? 

Best Regards,
Zhiming

0 Kudos
Reply

106 Views
dougbaker
Contributor III
Using Linux remoteproc.
0 Kudos
Reply

105 Views
dougbaker
Contributor III
In order to better isolate the messaging problems I am seeing, I went back to the original example code, confirmed that it worked correctly, and then began making small modifications. After those minor changes, I started seeing the same type of failures again.

The modification I made was:

#define USE_MEMORY_TEST (0)
#if USE_MEMORY_TEST
#define DUMMYBUF_SIZE 1024 // failed = 1024
static char dummy_buf[DUMMYBUF_SIZE];
#endif


I put this at the top of the void app_task(void *param)

#if USE_MEMORY_TEST
dummy_buf[DUMMYBUF_SIZE-1] = 1;
PRINTF("\r\nAdded DummyBuf size = %d...%d\r\n",
DUMMYBUF_SIZE, dummy_buf[DUMMYBUF_SIZE-1]);
#endif

After adding this code, I started seeing problems when stopping and restarting the M7 application.

With the code above enabled, messaging works correctly after a full reboot/power-up. However, if I stop and then restart the M7 application, the messaging fails and does not recover unless I perform a full system reset/reboot (either with the hardware reset switch or using shutdown -r now).

To stop/start the M7 CPU, I am using:
• echo stop > /sys/class/remoteproc/remoteproc0/state
• echo start > /sys/class/remoteproc/remoteproc0/state

Doug
0 Kudos
Reply