By default, the step/dir pins use GPIO access which is valid for either PRU core. The encoder signals, however, need to be direct PRU inputs, so the pins chosen and the pinmux setup will need to be valid for the specific PRU core you choose to run the driver. You setup the pin multiplexing outside of Machinekit/HAL, typically with a device-tree overlay, or the universal pinmux overlay and config-pin utility.
Some details on pin selection can be found in the PRU driver man page: https://www.machinekit.io/docs/man/man9/hal_pru_generic/ On Friday, November 17, 2023 at 3:25:37 AM UTC-6 Antti wrote: > Hello > > I have made my DIY CNC milling machine with BBB and DIY cape. I used > ARM.BeagleBone.Xylotex setup as base and modified that to work with my > machine. > I used old Omron servo drivers and motors with DIR and STEP signals. It > kinda works but now I'd like to add feedback signals from servos to BBB > (2048 pls/rev). > > So there is quadrature signals from X, Y and Z. I'm planning to use these > pins P9:25, P9:27, P9:28, P9:29, P9:30, P9:31 > I have understood that these pins are in PRU0 and first I have to config > the those as "pruin" in setup.sh file? > > Then the ini-file now: > [PRUCONF] > DRIVER=hal_pru_generic > CONFIG=pru=1 num_stepgens=3 > PRUBIN=xenomai/pru_generic.bin > > so can I change it to: > CONFIG=pru=0 num_stepgens=3 num_encoders=3 > > And how to I do the HAL wiring? > > Here is the pins that are in use now: > P8.07 out # gpio2.2 Enable System > P8.10 in # gpio2.4 XLIM > P8.11 out # gpio1.13 X_Dir > P8.12 out # gpio1.12 X_Step > P8.13 out # gpio0.23 PWM0/SPINDLE > P8.14 in # gpio0.26 YLIM > P8.15 out # gpio1.15 Y_Dir > P8.16 out # gpio1.14 Y_Step > P8.18 in # gpio2.1 ZLIM > P9.15 out # gpio1.16 Z_Step > P9.23 out # gpio1.17 Z_Dir > P8.09 in # gpio2.5 STOPin > Are these step/dir signals used by PRU 1? Or can I use these with PRU 0? > > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/machinekit/4321a4f9-b6dc-4148-9459-4af4c8d6ef37n%40googlegroups.com.