iMX7ULP - Does not return a message to the A7 core when using RPMsg

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

iMX7ULP - Does not return a message to the A7 core when using RPMsg

跳至解决方案
881 次查看
HenrikZ
Contributor III

Hi

I have tried to get the the "rpmsg_lite_str_echo_rtos" to work - and it works half the way...

I have compiled and loaded the example into the CM4 processor. And after booting the EVK, and entered "modprobe imx_rpmsg_tty" at the command line of the A7 processor, I'm greeted with a message in serial terminal for the M4 saying:

Nameservice sent, ready for incoming messages...
Get Message From Master Side : "hello world!" [len : 12]

If I send another message using: "echo test > /dev/ttyRPMSG30" this message is also received by the M4 processor - but I would expect the message to be echoed back to the A7 processor.
I have tried "cat /dev/ttyRPMSG30" and also made a little script to read from the virtual port, but in either case nothing is returned. Am I reading the echoed message correct?

The following code is from the "main_remote.c" of the example code.

        memcpy(tx_buf, app_buf, len);
        /* Echo back received message with nocopy send */
        result = rpmsg_lite_send_nocopy(my_rpmsg, my_ept, remote_addr, tx_buf, len);
        if (result != 0)
        {
            assert(false);
        }
        /* Release held RPMsg rx buffer */
        result = rpmsg_queue_nocopy_free(my_rpmsg, rx_buf);
        if (result != 0)
        {
            assert(false);
        }

 it seems that the function "rpmsg_lite_send_nocopy" should send the message back to the A7 core. The function is returning a "0" which means that it will never get into the two if sentences? I have not tried to follow the the function "rpmsg_lite_send_nocopy" to see which output it can give in which situations... But does a "0" mean the function did not successfully send the message?

BTW. why has the "multicore_examples" been removed from the latest SDK (SDK_24_12_00_EVK-MCIMX7ULP). The examples are included in SDK_2_16_000_EVK_MCIMX7ULP.


标签 (2)
标记 (2)
0 项奖励
回复
1 解答
862 次查看
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @HenrikZ ,

I hope you are doing very well.

 

You can see in the Linux driver code the function rpmsg_tty_cb, that the received data will be printed on the Kernel debug:

 

image.png

I tested it by my side and this is my result:

CORTEX A side:

image.png

You can see I sent the text "NXP Semiconductors" to Cortex M, and Cortex M sent back the same message as you can see on the log from rpmsg_tty_cb driver.

 

And this is from Cortex M:

image.png

 

Best regards,

Salas.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
863 次查看
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @HenrikZ ,

I hope you are doing very well.

 

You can see in the Linux driver code the function rpmsg_tty_cb, that the received data will be printed on the Kernel debug:

 

image.png

I tested it by my side and this is my result:

CORTEX A side:

image.png

You can see I sent the text "NXP Semiconductors" to Cortex M, and Cortex M sent back the same message as you can see on the log from rpmsg_tty_cb driver.

 

And this is from Cortex M:

image.png

 

Best regards,

Salas.

0 项奖励
回复
842 次查看
HenrikZ
Contributor III

Hi @Manuel_Salas 

Thanks for the answer. It was the detail about printing of the echo in the kernel debug I was missing - now it is also working for me.

And also nice that you are pointing out in the driver code where the message it being printed out, since it might become useful later on, when I'm going to use this for communication between the two processors.

best regards

Henrik