Using Both PRUs together on a Black Wireless

the best most reliable way for the two PRU to communicate is a ‘ring buffer’. More reliable than just a variable which wouldn’t account for requests generated faster than they could be handled.

a ring buffer sufficiently large, would allow requests to queue up awaiting processing. Neither PRU would need to obsess on whether the other PRU is ‘ready’ for communication. The writer would simply write to the buffer when appropriate, and the reader would read from the buffer when ready to perform the task.

Circular buffer - Wikipedia gives good overview of the process.

The app that I have made available for download uses two ring buffers. one connects the ARM processor to PRU1 and the second connects PRU1 to PRU0. You might find it instructive to study.

good luck
gomer

1 Like