On 8/20/2019 11:37 AM, mlampert wrote:
> It seems that hal_pru_generic can use any IO pin as an input or an output. 
> Is there still any advantage to use one of the PRU specific io pins?

There is little to no value in using PRU direct output pins vs. GPIO
pins for output signals (eg: step/dir/pwm).

There is still a strong preference to use the PRU direct input pins,
which can be read "instantly" (1 PRU clock) vs. reading from the GPIO
registers which stalls the PRU core for a few hundred nS while the
read makes it's way through the on-chip interconnect fabric.

Note the PRU encoder component requires the use of PRU direct inputs
for this reason.

> Also, I read somewhere that MK can only use one pru. Assuming that is 
> correct, does anybody know where the restriction comes from?

It isn't really a restriction so much as there has not been anyone who
needed/wanted to use both PRUs.  I had planned a "non-generic" version
of PRU code to do _really_ high-speed step generation or encoder
monitoring, but it was never really necessary...the hal_pru_generic
code runs fast enough for most of what I need (and often faster than
the stepper drivers will support!).

I do have a personal setup with the hal_pru_generic code running on
one PRU and custom PRU code running on the other PRU (making use of
the PWM & UART present in the PRU module to generate some custom pulse
sequences), so it's definitely possible.

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/machinekit/77f79ad3-0c9a-f9f6-4bf6-76524647f1e7%40steinkuehler.net.

Reply via email to