Thanks for the reply. I'm a big fan of LinuxCNC btw (use it on a couple of mills at my makerspace), so I think that's a very cool project.
I should have stated in my post that I did get a newer version of pasm (pasm_2 I think it is) and until then the XOUT was creating an assembler error when it hit the opcode. I see in your code you're using scratch pad 0 (the 10 in your instructions). I'm trying to use the direct PRU to PRU version (14) and it's not working for me. I just tried your approach (pad 0, AKA 10) and it works fine. Am I wrong in thinking you could use 14 and copy registers directly between the PRU's? -Kent On Wednesday, October 9, 2013 9:08:48 PM UTC-5, Charles Steinkuehler wrote: > > 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] <javascript:> > -- 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.
