RPI4 Raspbian 64 bit & LinuxCNC
10 Sep 2023 21:53 #280436
by rodw
I'm not sure if dependencies can be specified for specific architectures
I think I did a bit of a package search on the debian site and decided to add gpiod-dev to the builder, but left gpiod out. I'll add it back in.
There are probably a few more that will come to light.
Replied by rodw on topic RPI4 Raspbian 64 bit & LinuxCNC
Only if the dependencies are listed in the debian control file by the developer of the .deb fileI was under the impression that if a deb package was built against a certain library dev package that the library package was automatically included as a dependency.
I'm not sure if dependencies can be specified for specific architectures
I think I did a bit of a package search on the debian site and decided to add gpiod-dev to the builder, but left gpiod out. I'll add it back in.
There are probably a few more that will come to light.
Please Log in or Create an account to join the conversation.
11 Sep 2023 05:20 - 11 Sep 2023 05:20 #280452
by Donno
Replied by Donno on topic RPI4 Raspbian 64 bit & LinuxCNC
gpioinfo gives output i can read and write GPIO pins in terminal.
Can you please show example ?
Did you remember to add the hal_gipo read and write functions to a thread?
Can you please show example ?
Last edit: 11 Sep 2023 05:20 by Donno.
Please Log in or Create an account to join the conversation.
11 Sep 2023 09:35 #280464
by andypugh
libgpiod-dev has libgpiod2 as a dependency:
packages.debian.org/stable/libdevel/libgpiod-dev
But that does not appear to have a dependency on gpiod.
This might not be a problem, as I think that goiod is just the package that includes the tools (like gpioinfo) and isn't necessary for the library code to work.
Replied by andypugh on topic RPI4 Raspbian 64 bit & LinuxCNC
Only if the dependencies are listed in the debian control file by the developer of the .deb file
libgpiod-dev has libgpiod2 as a dependency:
packages.debian.org/stable/libdevel/libgpiod-dev
But that does not appear to have a dependency on gpiod.
This might not be a problem, as I think that goiod is just the package that includes the tools (like gpioinfo) and isn't necessary for the library code to work.
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
11 Sep 2023 09:39 #280465
by andypugh
Replied by andypugh on topic RPI4 Raspbian 64 bit & LinuxCNC
Can you please show example ?
addf hal_gpio.read base-thread
addf hal_gpio.write base-thread
addf hal_gpio.reset base-thread
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
11 Sep 2023 10:47 #280468
by Donno
Replied by Donno on topic RPI4 Raspbian 64 bit & LinuxCNC
Base thread gave me error so i used servo thread :
GPIO working as expected
sorry for dog noises.
addf hal_gpio.read servo-thread
addf hal_gpio.write servo-thread
addf hal_gpio.reset servo-thread
GPIO working as expected
sorry for dog noises.
Please Log in or Create an account to join the conversation.
11 Sep 2023 11:19 #280469
by rodw
Replied by rodw on topic RPI4 Raspbian 64 bit & LinuxCNC
Verry cool!
If you installed gpiod, can you remove it and retest?
sudo apt remove gpiod
I was going to add gpiod to the image but if it works without it there is no need and the last image can be a final for a while.
We will leave the installer on 2.10 branch for now. Hopefully, Andy can backport the driver to 2.9 branch before 2.9 is released.
If you installed gpiod, can you remove it and retest?
sudo apt remove gpiod
I was going to add gpiod to the image but if it works without it there is no need and the last image can be a final for a while.
We will leave the installer on 2.10 branch for now. Hopefully, Andy can backport the driver to 2.9 branch before 2.9 is released.
Please Log in or Create an account to join the conversation.
11 Sep 2023 12:12 #280473
by Donno
Replied by Donno on topic RPI4 Raspbian 64 bit & LinuxCNC
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
11 Sep 2023 12:42 #280475
by cornholio
Replied by cornholio on topic RPI4 Raspbian 64 bit & LinuxCNC
I think you'd have to spend some time working on latency to run a base thread to run steppers from the GPIO.
Maybe with a decent sd card, 3 cores isolated and a base thread of 30k to 40k you may have luck.
Maybe with a decent sd card, 3 cores isolated and a base thread of 30k to 40k you may have luck.
Please Log in or Create an account to join the conversation.
11 Sep 2023 14:10 #280479
by andypugh
Replied by andypugh on topic RPI4 Raspbian 64 bit & LinuxCNC
I did my testing on a Pi400 with a 10kHz base thread. With the reset function you can still get to 750rpm with 4x microstepping on a 200 step motor.
Please Log in or Create an account to join the conversation.
11 Sep 2023 20:28 #280494
by rodw
I have run steppers on an Arduino this way. To program a pulse with say 10 usec to write to a port and the same for the time for the end of a pulse, (total 30 usec), you should be able to get up to 33 kHz without a base thread. (if my maths is right) Which gives you about 1000 rpm on 10 x microstepping. MOst motors give up at 750 rpm
Replied by rodw on topic RPI4 Raspbian 64 bit & LinuxCNC
I don't understand why people insist on using a base thread on the Pi. It has a 54 Mhz timer frequency so that means using a simple square wave, the maximum frequency is 27 Mhz. We should be driving it like a Mesa stepgen.I did my testing on a Pi400 with a 10kHz base thread. With the reset function you can still get to 750rpm with 4x microstepping on a 200 step motor.
I have run steppers on an Arduino this way. To program a pulse with say 10 usec to write to a port and the same for the time for the end of a pulse, (total 30 usec), you should be able to get up to 33 kHz without a base thread. (if my maths is right) Which gives you about 1000 rpm on 10 x microstepping. MOst motors give up at 750 rpm
Please Log in or Create an account to join the conversation.
Time to create page: 0.166 seconds