This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-J721S2: IPC issue

Part Number: PROCESSOR-SDK-J721S2

Dear Community and TI support,

      I am trying to use the IPC example (ti-rpmsg-char) at Linux side , and write my code at MCU1_0 followed the PDK example (ipc_echo_test.c) . I saw the endpoint at Linux side after I announce at MCU1_0 :

ls -l /sys/bus/virtio/drivers/virtio_rpmsg_bus/virtio0/virtio0.rpmsg_chrdev.-1.83/
total 0
-r--r--r-- 1 root root 4096 Jan 29 00:00 announce
-r--r--r-- 1 root root 4096 Jan 29 00:00 desc
lrwxrwxrwx 1 root root 0 Jan 29 00:00 driver -> ../../../../../../../../../../../bus/rpmsg/drivers/rpmsg_chrdev
-rw-r--r-- 1 root root 4096 Jan 29 00:00 driver_override
-r--r--r-- 1 root root 4096 Jan 29 00:00 dst
-r--r--r-- 1 root root 4096 Jan 29 00:00 modalias
-r--r--r-- 1 root root 4096 Jan 29 00:00 name
drwxr-xr-x 2 root root 0 Jan 29 00:00 power
drwxr-xr-x 3 root root 0 Jan 29 00:00 rpmsg
-r--r--r-- 1 root root 4096 Jan 29 00:00 src
lrwxrwxrwx 1 root root 0 Jan 29 00:00 subsystem -> ../../../../../../../../../../../bus/rpmsg
-rw-r--r-- 1 root root 4096 Jan 29 00:00 uevent

     

       I use the RPMessage_recvNb() at MCU1_0 side , but no message received.  Here is the log from rpmsg_char_simple :

./rpmsg_char_simple -r 0 -p 83 -d rpmsg_chrdev
Created endpt device rpmsg-char-0-709, fd = 3 port = 1026
Exchanging 100 messages with rpmsg device ti.ipc4.ping-pong on rproc id 0 ...

Sending message #0: hello there 0!
Can't write to rpmsg endpt device
: Unknown error 512
send_msg failed for iteration 0, ret = -1
TEST STATUS: PASSED

     

      Where the problem may be ?

  • Hello,

    May i know which sdk version is being used ?

    The current ipc echo test example running on RTOS requires the end point to be 14. As you are using different end point number it is failing now.

    Regards

    Tarun Mukesh

  • Hello ,

    I am using SDK 8.5 . I change my endpoint to 14 , but is still not work..

  • Hello,

    ipc_echo_test.c file only contains self proc and remote proc id details .The source files are in packages/ti/drv/ipc/examples/common/src ,have you built using this as well. 

    write my code at MCU1_0

    Could you share your source code, i will have  a look into it?

    Sending message #0: hello there 0!

    A72 started sending messages but application on MCU1_0 is not able to receive the message.

    REgards

    Tarun Mukesh

  • Hello,

    At linux side , I use the example code completely : rpmsg/ti-rpmsg-char - Unnamed repository; edit this file 'description' to name the repository.. The version is 5.1 . the run command is : ./rpmsg_char_simple -r 0 -p 83 -d rpmsg_chrdev

    At RTOS side , here is my main code :

            RPMessageParams_init(&params);

            params.requestedEndpt = 83;

            params.buf = buf;
            params.bufSize = bufSize;
            params.numBufs = 16;

            handle = RPMessage_create(&params, &myEndPt);
            if(!handle)
            {
                UART_printf("RecvTask: Failed to create endpoint\n");
                return;
            }

            status = RPMessage_announce(IPC_MPU1_0, myEndPt, "rpmsg_chrdev");
            if(status != IPC_SOK)
            {
                UART_printf("RecvTask: RPMessage_announce() for rpmsg_chrdev failed\n");
                return;
            }
            Ipc_mailboxEnableNewMsgInt(IPC_MCU1_0, IPC_MPU1_0);

    status = RPMessage_recvNb(handle, (Ptr)str, &len, &remoteEndPt, &remoteProcId);
            if(status != IPC_SOK)
            {
                UART_printf("RecvTask: failed with code %d\n", status);
            }
            else
            {
                /* NULL terminated string */
                str[len] = '\0';
                UART_printf("RecvTask: Revcvd msg \"%s\" len %d from %s\n",
                        str, len, Ipc_mpGetName(remoteProcId));
            }
            status = RPMessage_send(handle, remoteProcId, remoteEndPt, myEndPt_linux, str, len);
            if (status != IPC_SOK)
            {
                UART_printf("RPMessage_send failed");
            }
  • Hello,

    I believe this is only the respond function,prior to this has the Virtio initialisation happened ? resource table was loaded ? RPmsg initialization ?

    You can look into  packages/ti/drv/ipc/examples/common/src/ipc_testsetup.c file or packages/ti/drv/ipc/examples/common/src/ipc_testsetup_baremetal.c 

    Is it bare metal on MCU1_0 or any OS being used ?

    Ipc_mailboxEnableNewMsgInt(IPC_MCU1_0, IPC_MPU1_0);

    I don't understand why self proc id and remote proc id both are A72.This has to be initialised during RPmessage initialization

    Regards

    Tarun Mukesh