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.

AM3358: Remoteproc vring buffer overflows

Part Number: AM3358

I am using Remoteproc in an application on a BeagleBone Black running Debian.

I have been through the TI documentation (getting started guide,etc.) and have ARM code in C communicating back and forth with PRU0 code (also written in C).  It works well in most cases but right now I am attempting to have the ARM send a message to alert the PRU program to stop running a routine in its code and do something else.   The PRU code should send back a special word using remoteproc when it gets this notice from the ARM code.

It works well sometimes but in one instance I'm getting strange pieces of the words I should be getting back and sometimes characters that aren't related to the words at all are returned.

I suspect there may be some issue with the vring buffers getting trash written in to them by something else or when they wrap around something I don't understand is going on. 

Is there a resource that explains how these buffers are managed?  I have tried reading through the source code for the library and I have a basic understanding, very basic, of how the various routines are checking the payload against the maximum buffer size, getting the next available buffer or sending an error if one isn't available, etc.    But I have to assume what most of these variables in the structures actually do.  For instance, it looks like 'head' is used somehow to know where the payload goes into the buffer, but I'm not sure how.  And what if no buffer is available?   Is there somewhere that the buffers are released after being used?

Is there documentation that explains this better somewhere?