Rpmsg architecture seems to have low bandwidth, how to optimize?

I can communicate between A7 and M4 core via UARTs successfully and close to the 115200 bitrate. I am evaluating using rpmsg instead. I am sending 10 bytes at a 200Hz rate and dropping data using rpmsg.

I have a thread on the A7 that continually waits for incoming data from the MU and prints to the linux console. I’m using your Linux 2.8

char mubuf_rx[512];

int mufd = open("/dev/ttyRPMSG0", O_RDWR | O_NOCTTY );

if (mufd >= 0){

tcgetattr(mufd, &tty);    // get current attributes

cfmakeraw(&tty);    // raw input

//tty.c_cc[VMIN] = 0;    // non blocking

//tty.c_cc[VTIME] = 0;    // non blocking

tcsetattr(mufd, TCSANOW, &tty);    // write attributes

    printf("opened Messaging Unit\r\n");

    while (bEnableMU_Thread){

	int nss = read(mufd, mubuf_rx, sizeof(mubuf_rx));




In the M4 I just keep writing to the MU unit 10 characters at a 200Hz rate.

How can I optimize the transfer bandwidth? If I’m correct, I remember reading that the buffer is limited to 512 characters, but is smaller size due to issues with Linux.

What are maximum buffer sizes and how can I increase bandwidth. Is 2000 bytes/sec too high to expect?


Hi @bobpbbd104
The maximum buffer size is limited by the available RAM only. In our case, we have increased the buffer size to 5000 bytes and we are sending 4000 bytes of data for every 12.5ms from M4 to A7(320000 bytes/sec). So, from this 2000bytes/sec would be easily possible with iMX7D.

Thanks very much for responding. Would you be able to point me in the right direction for setting buffer sizes. I assume you’re configuring memory within the MU such that the M4 cannot overflow a buffer or are you referring to the buffer passed to read and writes on the A7 side?

I am referring the buffer that is used to pass data between the cores.By default, we have a buffer size of 512 bytes which means the size of single buffer and the number of buffers is 256 by default. To increase the size of a buffer follow this link

thanks very much

You are welcome