On 9/25/2013 4:48 PM, Mark A. Yoder wrote:
> What's the current status of the PRUs?  Has anyone produced some tutorials 
> on how to do simple things on it?  I've looked at the examples in Jason's 
> post, but more examples on how to do simple things would be helpful.

I have some basic example code I tried to comment very well for use as
an example of the PRU debugger available with LinuxCNC.  It mostly just
sets up the timer portion of the industrial Ethernet controller (the
only part that's documented) and blinks some LEDs.  I tried to provide
examples of various assembler features (like using records/structs) as
well as use a variety of coding techniques (including a jump table for
case logic).  Perhaps you might find something useful reading through
the code:

https://github.com/cdsteinkuehler/linuxcnc/blob/MachineKit-ubc/configs/ARM/PRU-Debugger/pruexample.p

...or if you've got a copy of my MachineKit image you can try running it
with the debugger and single-stepping through the code.

> For example, how does on set up a double buffer between the ARM and the PRU 
> with the PRU interrupting the ARM when it's finished with one buffer and is 
> working on the next so the ARM can refill the buffer.

That is totally *NOT* simple and has a *LOT* of places where things can
go wrong (race conditions, deadlocks, cache management, etc).  I'll
probably have code that deals with all of this at some point, but I
wouldn't expect it to be a newbie oriented HOWTO code example.

> Or, examples of the PRU talking to things on the i2c or SPI buses.
> 
> Has anyone gotten the PRU to control a quadcopter?

No to both of the above, AFAIK.

-- 
Charles Steinkuehler
char...@steinkuehler.net

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to