RPMsg example question

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

RPMsg example question

116 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

38 Views
dougbaker
Contributor III

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

0 Kudos
Reply

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

49 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

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

3 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
%3CLINGO-SUB%20id%3D%22lingo-sub-2377616%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERPMsg%20example%20question%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2377616%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20using%20a%20IMX8%20with%20a%20A53%20and%20a%20M7.%26nbsp%3B%20The%20M7%20code%20is%20built%20with%20VSCode%20and%20MCUXpresso%20environment.%26nbsp%3B%20The%20M7%20runs%20Free%20RTOS%20and%20I%20have%20the%20M7%20running%20example%20projects.%26nbsp%3B%20I%20have%20the%20example%20%E2%80%9Cmulticoe_examples%2Frpmsg-lite-str-echo-rtos-remote%E2%80%9D%26nbsp%3B%20running%20but%20I%20have%20some%20questions%20about%20it.%3C%2FP%3E%3CP%3EOn%20a%20fresh%20boot%2C%20it%20generally%20works%20when%20I%20can%20sent%20messages%20from%20the%20A53%20to%20the%20M7.%26nbsp%3B%20If%20I%20restart%20jut%20the%20M7%20CPU%2C%20the%20messages%20do%20not%20The%20messages%20only%20work%20after%20a%20full%20reset%20including%20the%20A53.%26nbsp%3B%20When%20rebooting%20justthe%20m7%20core%2C%20the%20M7%20fails%20on%20the%20following%20call%3A%20%3CSTRONG%3Erpmsg_lite_is_link_up%3C%2FSTRONG%3E(my_rpmsg)%3B%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EIs%20there%20a%20example%20or%20recommended%20way%20to%20implement%202%20endpoints%20between%20the%20A53%20and%20the%20M7%3F%26nbsp%3B%20How%20should%20two%20endpoints%20between%20the%20two%20cores%20be%20implemented%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EAm%20I%20asking%20this%20question%20in%20the%20right%20forum%3F%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EDoug%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2378359%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20RPMsg%20example%20question%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2378359%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Eecho%20start%20%26gt%3B%20%2Fsys%2Fclass%2Fremoteproc%2Fremoteproc0%2Fstate%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2378364%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20RPMsg%20example%20question%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2378364%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Eecho%20start%20%26gt%3B%20%2Fsys%2Fclass%2Fremoteproc%2Fremoteproc0%2Fstate%5EC%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2377995%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20RPMsg%20example%20question%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2377995%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F136710%22%20target%3D%22_blank%22%3E%40dougbaker%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EHow%20did%20you%20load%20the%20M7%3F%20Using%20Linux%20remoteproc%20sysfs%20or%20U-Boot%20commands%3F%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20Regards%2C%3CBR%20%2F%3EZhiming%3C%2FP%3E%3C%2FLINGO-BODY%3E