The practical limit on the number of PRU channels is the available PRU
memory and how long it takes the PRU to process each channel.

The MAX_CHAN value comes from the software pwm driver and is not
currently used.  It is somewhat misnamed, as it does not represent the
number of PWM channels, but the number of PWM timebases available.
Each PWM timebase can have as many channels as you want, but they will
all operate at the same frequency.

If you're not specifically wanting to use Python, I don't think py-uio
will be of much use.  What you need is a UIO device-tree definition
for the PRU, which should be easy enough to port over from the BBB.
You can then use the prussdrv library, although it might need a bit of
tweaking if you want to support both PRU subsystems available on the
X15.  Another probably easier alternative would be to use libuio,
which would be like using py-uio, except you wouldn't have to recode
everything in python:

https://github.com/Linutronix/libuio

...but I think getting the device tree entries created and using
prussdrv would be the easiest.

On 10/11/2018 10:12 AM, Magnus Wiberg wrote:
> I've got a Beagleboard x15 for which there's no uio driver setup, only ti's 
> remoteproc_pruss, thus the existing HAL_PRU_GENERIC driver won't work as 
> is. I'm planning to use py-uio ( 
> https://groups.google.com/forum/#!topic/beagleboard-x15/MfB-GMl0UYA ) to 
> get a UIO for the pru. I thought that I could use the py-uio to load the 
> *.p code and then communicate to it with the *.c code. My understanding is 
> that the *.c code communicates with the pru by flipping bits at different 
> addresses in the arm-processors memmory which are mapped to the pru memory. 
> If I can get the *.c code flip bits by using the py-uio, It should work 
> with not too much work, no?
> https://github.com/mvduin/py-uio/wiki/Memory-access
> 
> It is not that I necessarily want to use python, I just thought using 
> py-uio might be the easiest way to get pru io working with machinekit. 
> 
> Also one thing that pusseled me when looking at the code: Is there a limit 
> to 8 pru channels in the code? I'm asking because I see that in 
> hal_pru_generic.c 
> <https://github.com/jadonk/machinekit/blob/master/src/hal/drivers/hal_pru_generic/hal_pru_generic.c>
>  it 
> says:
> // Maximum number of PRU "channels"
> #define MAX_CHAN 8
> Is there any reason for this, or is 8 just an arbitrary number? I can't see 
> it being used in the code anywhere. is it even used? (I'm asking since I 
> will need 12 channels)
> 
> Best,
> Magnus
> 


-- 
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