On 9/7/2016 7:50 PM, William Hermans wrote: > > SETDATAOUT -> |= BITx > CLEARDATAOUT -> &=(~BITx) > > I gues I'll have to reread the TRM again.
The set/clear registers only affect the bits that are written with a '1' value, all other bits remain unchanged, while writing directly to the DATAOUT register affects the value of all 32 bits in the GPIO bank. Using the set/clear registers allows a single atomic write operation to affect the specific bit(s) you want to change without having to perform a non-atomic read-modify-write cycle. Since the write to the set or clear register is atomic, if both the ARM and the PRU both use this method, no locks or other hand-shaking is required to prevent corruption. -- Charles Steinkuehler [email protected] -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/4db8f6f0-f70a-0d28-29f9-3d0aba8dd690%40steinkuehler.net. For more options, visit https://groups.google.com/d/optout.
