Part Number: AM3358
Tool/software: Linux
I am using RPMsg for communication between a Linux kernel module and the PRU. To help with debugging I have the PRU echoing all received commands back to the ARM core. I then use printk from the rpmsg callback to log all traffic between the cores. I don't send many messages back and forth but in some instances the PRU will send multiple messages in close proximity. Occasionally I am seeing messages that don't get printed. However when this happens I can send another message to the PRU (which gets echoed back to the ARM core) which will cause the missing message to print.
Does anything prevent the ARM side from servicing all available messages sent by the PRU?
On the PRU you loop in place to consume all available messages doing something like:
while (pru_rpmsg_receive(&transport, &src, &dst, payload, &len) == PRU_RPMSG_SUCCESS) {
/* message parsing */
}
On the ARM side with Linux you use register_rpmsg_driver() and provide a callback function that gets executed when the PRU interrupts the ARM core. Given the way drivers/rpmsg/rpmsg_pru.c and samples/rpmsg/rpmsg_client_sample.c are are structured it looks like you will only ever get one message per callback. Does the Linux side of the RPMsg framework do any looping under the hood to consume all available messages or is this strictly a one to one relationship between callback and interrupt?