Thank you all for the encouraging info, knowing that what I want to do is possible with the hardware I have gives me renewed confidence to continue the project.
It is nice to hear from the author of libpruio. I was perfectly happy using rpmsg for communication but I understand that uio is much lighter and does not require the data to go through a kernel driver.
@DTJF Thank you for creating and also mentioning libpruio. If you don’t mind I would like to ask you a few questions:
Q1. From the below, it seems like I am missing uio_pruss. The update_kernel.sh is no longer in /opt. Do I need to go back to the previous debian release with the 4.19 kernel in order to use libpruio?
root@BeagleBone:~# uname -a
Linux BeagleBone 5.10.168-ti-r71 #1bullseye SMP PREEMPT Fri Sep 1 04:05:07 UTC 2023 armv7l GNU/Linux
root@BeagleBone:~# lsmod|grep uio
uio_pdrv_genirq 20480 0
uio 20480 1 uio_pdrv_genirq
The machine that I am building is a parallel winding machine will be used in a production environment. I am a little unsure if I should set up pwm and then adjust using the pru, or do the synchronized pulses (winding motor + traverse motor) in software. Software seems safer as they will stop if the software hangs, while the pwm will just keep going, possibly will need to have a trip-condition that if not updated by the pru will stop the pwm.
I am a little worried about latency (thus wanting deterministic code in the pru) around the edges of the coil when the traverse motor has to stop and reverse direction. I will start with max 200 imp/rev and 8 rps = 1600 impulses / s and increase the pulses / rev if performance permits.
My understanding is that there is a firmware on the pru which is loaded by the linux program,
however in the documentation it is quite unclear which are the pru firmware, everything looks like programs that run on the host.
I was thinking that my application needs a custom firmware for the pru, that is capable of communicating with the linux host, but should be able to the job of winding with the set parameters without arm–pru communication. Communication should be used to see status, adjust speed, start/stop, etc.
Q2. How do I go about understanding where the pru program is and where the linux program is from libpruio documentation/sources?
Q3. For me commands (ex. adjust speed, adjust stop length do not have to be fast, I mean a human will barely notice 100 ms delay, while for the machine this is a very long time. I am more worried about the cycles necessary on the pru, for example if the winding is at the edge, it needs to be pulse-perfect in order to turn around at the right time. Which communication method is right for me?
From io, mm and rb I would guess IO.
Sorry for the long text and thank you!