RPMsg example question

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

RPMsg example question

147件の閲覧回数
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 件の賞賛
返信
5 返答(返信)

69件の閲覧回数
dougbaker
Contributor III

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

0 件の賞賛
返信

70件の閲覧回数
dougbaker
Contributor III
echo start > /sys/class/remoteproc/remoteproc0/state
0 件の賞賛
返信

80件の閲覧回数
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 件の賞賛
返信

35件の閲覧回数
dougbaker
Contributor III
Using Linux remoteproc.
0 件の賞賛
返信

34件の閲覧回数
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 件の賞賛
返信
%3CLINGO-SUB%20id%3D%22lingo-sub-2377616%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERPMsg%E3%81%AE%E4%BE%8B%E9%A1%8C%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2377616%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E7%A7%81%E3%81%AFIMX8%E3%81%ABA53%E3%81%A8M7%E3%82%92%E7%B5%84%E3%81%BF%E5%90%88%E3%82%8F%E3%81%9B%E3%81%A6%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82M7%E3%81%AE%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AF%E3%80%81VS%20Code%E3%81%A8MCUXpresso%E7%92%B0%E5%A2%83%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E6%A7%8B%E7%AF%89%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82M7%E3%81%AFFreeRTOS%E3%81%A7%E5%8B%95%E4%BD%9C%E3%81%97%E3%80%81%E7%A7%81%E3%81%AFM7%E4%B8%8A%E3%81%A7%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%E3%83%97%E3%83%AD%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%95%E3%81%9B%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%E3%80%8Cmulticoe_examples%2Frpmsg-lite-str-echo-rtos-remote%E3%80%8D%E3%81%A8%E3%81%84%E3%81%86%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81%E3%81%84%E3%81%8F%E3%81%A4%E3%81%8B%E8%B3%AA%E5%95%8F%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E8%B5%B7%E5%8B%95%E7%9B%B4%E5%BE%8C%E3%81%A7%E3%81%82%E3%82%8C%E3%81%B0%E3%80%81A53%E3%81%8B%E3%82%89M7%E3%81%B8%E3%83%A1%E3%83%83%E3%82%BB%E3%83%BC%E3%82%B8%E3%82%92%E9%80%81%E4%BF%A1%E3%81%A7%E3%81%8D%E3%82%8B%E5%A0%B4%E5%90%88%E3%81%AF%E3%80%81%E6%A6%82%E3%81%AD%E6%AD%A3%E5%B8%B8%E3%81%AB%E5%8B%95%E4%BD%9C%E3%81%97%E3%81%BE%E3%81%99%E3%80%82M7%20CPU%E3%81%A0%E3%81%91%E3%82%92%E5%86%8D%E8%B5%B7%E5%8B%95%E3%81%97%E3%81%A6%E3%82%82%E3%83%A1%E3%83%83%E3%82%BB%E3%83%BC%E3%82%B8%E3%81%AF%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%E3%83%A1%E3%83%83%E3%82%BB%E3%83%BC%E3%82%B8%E3%81%AFA53%E3%82%92%E5%90%AB%E3%82%80%E5%AE%8C%E5%85%A8%E3%81%AA%E3%83%AA%E3%82%BB%E3%83%83%E3%83%88%E5%BE%8C%E3%81%AB%E3%81%AE%E3%81%BF%E6%A9%9F%E8%83%BD%E3%81%97%E3%81%BE%E3%81%99%E3%80%82m7%E3%82%B3%E3%82%A2%E3%81%AE%E3%81%BF%E3%82%92%E5%86%8D%E8%B5%B7%E5%8B%95%E3%81%99%E3%82%8B%E3%81%A8%E3%80%81M7%E3%81%AF%E6%AC%A1%E3%81%AE%E5%91%BC%E3%81%B3%E5%87%BA%E3%81%97%E3%81%A7%E5%A4%B1%E6%95%97%E3%81%97%E3%81%BE%E3%81%99%EF%BC%9A%20%3CSTRONG%3Erpmsg_lite_is_link_up%3C%2FSTRONG%3E%20(my_rpmsg)%3B%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EA53%E3%81%A8M7%E3%81%AE%E9%96%93%E3%81%AB2%E3%81%A4%E3%81%AE%E3%82%A8%E3%83%B3%E3%83%89%E3%83%9D%E3%82%A4%E3%83%B3%E3%83%88%E3%82%92%E5%AE%9F%E8%A3%85%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AE%E4%BE%8B%E3%82%84%E6%8E%A8%E5%A5%A8%E3%81%95%E3%82%8C%E3%82%8B%E6%96%B9%E6%B3%95%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%81%8B%EF%BC%9F2%E3%81%A4%E3%81%AE%E3%82%B3%E3%82%A2%E9%96%93%E3%81%AE2%E3%81%A4%E3%81%AE%E3%82%A8%E3%83%B3%E3%83%89%E3%83%9D%E3%82%A4%E3%83%B3%E3%83%88%E3%81%AF%E3%81%A9%E3%81%AE%E3%82%88%E3%81%86%E3%81%AB%E5%AE%9F%E8%A3%85%E3%81%99%E3%81%B9%E3%81%8D%E3%81%A7%E3%81%97%E3%82%87%E3%81%86%E3%81%8B%EF%BC%9F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%E3%81%93%E3%81%AE%E8%B3%AA%E5%95%8F%E3%82%92%E3%81%99%E3%82%8B%E5%A0%B4%E3%81%AF%E9%81%A9%E5%88%87%E3%81%A7%E3%81%97%E3%82%87%E3%81%86%E3%81%8B%EF%BC%9F%3C%2FP%3E%3CP%3E%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86%E3%81%94%E3%81%96%E3%81%84%E3%81%BE%E3%81%99%3C%2FP%3E%3CP%3E%E3%83%80%E3%82%B0%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-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%3E%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF%E3%80%81%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F136710%22%20target%3D%22_blank%22%3E%40dougbaker%E3%81%95%E3%82%93%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EM7%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%AE%E3%82%88%E3%81%86%E3%81%AB%E5%BC%BE%E3%82%92%E8%A3%85%E5%A1%AB%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%81%8B%EF%BC%9FLinux%E3%81%AEremoteproc%20sysfs%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%81%BE%E3%81%9F%E3%81%AFU-Boot%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%81%8B%EF%BC%9F%3CBR%20%2F%3E%3CBR%20%2F%3E%E3%82%88%E3%82%8D%E3%81%97%E3%81%8F%E3%81%8A%E9%A1%98%E3%81%84%E3%81%97%E3%81%BE%E3%81%99%E3%80%81%3CBR%20%2F%3E%E5%BF%97%E6%98%8E%3C%2FP%3E%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