On 10/9/2013 3:58 PM, Kent Bowling wrote:
> I'm currently trying to us the scratch pad to do some PRU0<-->PRU1 
> communication. I cannot get it working and I'm worried I'm missing some 
> crucial initialization step of some sort. I've got other things working 
> (including interrupts being sent between the two PRU's), but I can't get 
> XOUT (or XIN) to work.
> 
> Are there any examples or source code I can look at out there doing this 
> successfully.

Those instructions work fine for me.  I've got a working example in my
PRU code for LinuxCNC.  I use the xout instruction to store the GPIO
addresses (which are only used once per task loop but take up four
registers) as part of system setup, the read them in a single
instruction cycle using xin.

Xout example:
https://github.com/cdsteinkuehler/linuxcnc/blob/MachineKit-ubc/src/hal/drivers/hal_pru_generic/pru_generic.p#L201

Xin example:
https://github.com/cdsteinkuehler/linuxcnc/blob/MachineKit-ubc/src/hal/drivers/hal_pru_generic/pru_wait.p#L69

Using the single-stepping debugger available with LinuxCNC, you can see
the instruction working properly.

NOTE:  You do need to make sure you're using a version of pasm that
supports these instructions.  The first version from TI didn't.

-- 
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/groups/opt_out.

Reply via email to