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

ソリューションへジャンプ
837件の閲覧回数
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 解決策
818件の閲覧回数
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 返答(返信)
819件の閲覧回数
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 件の賞賛
返信
798件の閲覧回数
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