On Friday, January 16, 2015 at 1:58:33 PM UTC-5, Bill Gray wrote:

>
> The idea is that the host program is constantly setting an address in 
> shared memory to 0 in a loop.  The PRU is also constantly incrementing that 
> same address.  If the host loop stops, the value at the address climbs 
> above a maximum and the PRU knows that the host program has gone away.
>
> As I think this scheme through, I realize that there is a large likelihood 
> that the host program and the PRU will try to operate on this shared memory 
> address at the same time!
>
> So far my program has not appeared to suffer any ill effects, but I guess 
> I'm just interested in how this is handled by the am335x and if I ought to 
> aware of possible gotchas!
>
> The memory writes should be atomic but the read modify write will not be. 
This will cause you to loose some sets to zero when the PRU reads the 
memory location, ARM sets it to zero then the PRU writes back the 
incremented value. It would be good to have the increment rate and clear 
rate such that if they conflict once that they won't both happen at the 
same time at the next set to zero.


-- 
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