On 3/3/2017 10:22 AM, 'Marco Negrini' via Machinekit wrote:
> hi everyone,
> i am studying machinekit, in particular on the BeagleBone, i' ve found that 
> in 
> the CRAMPS.hal file it loads a file for the PRU called pru_generic.bin.
> for what i've been able to see, the pru now controls stepgen and pwm 
> generation.
> is there a manual for this libraries for the PRU?
> 
> in the directory /usr/lib/linuxcnc/xenomai i' ve found other files like 
> hal_pru.so or pru_decamux.bin...
> searching i have see a manual of linuxcnc 
> <http://linuxcnc.org/docs/2.7/pdf/LinuxCNC_Manual_Pages.pdf>, i think it 
> explain 
> something related with this files, does anyone know a more PRU specific 
> manual?

There are various TI manuals that cover the operation and programming
of the PRU, if that's what you are looking for.

If you are wanting documentation on how the PRU is used in Machinekit,
there isn't anything written up other than the code.  You can find the
ARM and the PRU files inside the hal_pru_generic directory:

https://github.com/machinekit/machinekit/tree/master/src/hal/drivers/hal_pru_generic

There is a top level file for each side:

ARM: hal_pru_generic.c
PRU: pru_generic.p

...and each function (pwm, stepgen, encoder) has it's own PRU
"tasklet" (*.p file) and corresponding ARM side driver (*.c file)
which performs a specific function.

When loaded, the driver takes the command line arguments and builds a
task list in PRU memory to implement the desired function(s).  This
list also contains any parameters and local storage required for each
"tasklet".  The PRU runs through the linked list of tasks then waits
for a timer tick to start all over again.  The code should be
reasonably easy to follow, but ask if you have any questions.

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

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to