On 12/20/2017 5:42 AM, Rob M wrote:
> My apologies for pointing out the basics of the PRU subsystem.
> 
>  It still wont give you the same performance or lack of jitter that using 
> the PRU for step-dir generation or on the x86 platform using a Mesa or 
> other FPGA for step-dir generation from the information I have read. Tho I 
> guess you wont have to deal with system management interrupts.
> 
> After reading the machinekit page for hal_pru_generic there doesn't seem to 
> be a mention about the max number of stepgen instances, 5 may not be a 
> problem.....tho this is just purely guess work.

The number of stepgen instances you can run depends on the maximum
frequency (and PRU thread timing) you require.  I routinely run 5
stepgen instances with a 3 uS PRU period giving a maximum step
frequency of about 166 KHz (3 uS high, 3 uS low).

> Latency is reduced somewhat using the isolcpus option, as far as I 
> understand, but it's still not the same as using hardware for generating 
> step-dir pulses.

The problem with using one of the ARM A cores for stepgen is they are
not really designed for low IRQ latency, even when lightly loaded.  If
you dedicated a core to the real-time base thread and used the fiq on
the ARM you'd probably get pretty usable results, but you wouldn't
match the PRUs and you'd have to write some low-level software.  I'm
not sure how much the performance drops if you use a regular IRQ
instead of the fiq, but you can try it.  It should be pretty easy to
test using standard Linux tools (to isolate a CPU and assign specific
process threads to that CPU).

Probably the easiest way to get high-performance results on the Pi is
to use DMA to send a data stream to the GPIO pins (similar to the PRU
toggling the data pins on the BBB, but you've got to calculate
everything in advance in your servo thread).  I don't think anyone has
done this (with Machinekit), but the programming required is IMHO a
*LOT* less complicated than getting the fiq working, and there are
some working examples to start from.

-- 
Charles Steinkuehler
[email protected]

-- 
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 [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to