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));
printf(mubuf_rx);
fflush(stdout);
}
}
In the M4 I just keep writing to the MU unit 10 characters at a 200Hz rate.
Questions:
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?
Thanks