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.

RTOS: RPMsg message length

Other Parts Discussed in Thread: AM3358

Tool/software: TI-RTOS

Whats is the maximum message length in the RemoteMsg (RemoteProc)?

I know that the maximum buffer length is defined by `RPMSG_BUF_SIZE`, but the header is difficult to predict.

Inside the `pru_rpmsg_send()` there is the checking `if (len > (RPMSG_BUF_SIZE - sizeof(struct pru_rpmsg_hdr)))`. But the library header file `pru_rpmsg.h` could be updated with the definition `#define RPMSG_MSG_SIZE (RPMSG_BUF_SIZE - sizeof(struct pru_rpmsg_hdr))` to provide to the user of the lib one treatment to long messages.

  • Tool/software: TI-RTOS

    How to (What is the best way to) send a long message (PRU to ARM on chip AM3358)?

    I am trying the follow code:

    char message[500];

    strcpy(message, "......"); // Repeated more than one time.

    len = strlen(message); // That may be bigger than the pru_rpmsg buffer.

    messageTransmit = message;
    while(len>=100) {
             if( PRU_RPMSG_SUCCESS == pru_rpmsg_send(&transport, dst, src, messageTransmit, 100)) {
                       len -= 100; // Already transmitted 100 words.
                       messageTransmit += 100; // Put the pointer to the rest of the message.
             }
    }
    while(PRU_RPMSG_SUCCESS != pru_rpmsg_send(&transport, dst, src, messageTransmit, len) );

    But this multiple sends appear not to work.

  • Please do not open multiple threads on the same subject on this forum. Your threads have been merged. The software team will reply here.
  • Hello Hildo,

    In general, I would not suggest using the RPMsg message field to transfer really long messages or large amounts of information. It would probably be better to place large amounts of information somewhere in memory, then send the ARM an interrupt so it knows to go check that memory location.

    Regards,
    Nick
  • Hello Hildo,

    RPMSG_BUF_SIZE = 512 bytes, and the header is 16 bytes. Your maximum message length is 496 bytes.

    Regards,
    Nick