On 7/2/2014 11:24 AM, TJF wrote: > Am Mittwoch, 2. Juli 2014 07:25:45 UTC+2 schrieb Spaced Cowboy: >> >> 1) I have an assembly program running on PRU0 receiving data in a tight >> loop, and I want to signal PRU1 at some point to do further processing on >> the bytes received. Is it possible to have PRU0 write into a register (say >> r2) on PRU1 using a SBBO and wake up PRU1 from executing a WBS instruction >> ? It seems so, from the memory map, but the docs seem to discourage WBS >> with anything other than r31 > > > The easiest way to communicate between PRU-0 and PRU-1 is to use the data > ram (= DRam, 8 kB for each PRU, as Charles said). Ie. when PRU-0 receives > data and stores them at address 0x0100, PRU-1 can access them at address > 0x2100. Also when PRU-1 writes to address 0x0100, PRU-0 can read this data > at 0x2100. You may use some bytes for handshaking and take the rest of the > DRam to exchange the data. > > An alternative (and slower) way is to use a memory block allocated on the > host. The kernel driver allocates an external memory block for the PRUSS > (512 kB by default, this can get customized up to 8 MB).
If you actually need to communicate data, the fastest way is using the scratchpad registers, where you can send up to 248 bytes in a single clock. It's also possible to directly send data from one PRU to the other using this method (execute the XOUT instruction on one PRU and the XIN on the other), but your execution timing between the two PRUs has to be within 1024 clocks or the instruction will time out. This is also a good way to exactly synchronize code on the two PRUs, if you ever need to do that. -- 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]. For more options, visit https://groups.google.com/d/optout.
