I think you will run into concurrency issues.
The operations to increment the buffer need to be atomic, but they are not.
While you perform the read / add / modulus / write in the Arm, then PRU can add 
a new message and change the value.
The ring buffer can get corrupt.

I would set a flag in shared memory stating the arm read a value from the ring 
buffer.
You then wait for the flag to clear before reading the next value.
The PRU would then change the ring buffer pointers and reset the flag.

The trick is for the PRU to be the only core manipulating the buffer pointers.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to