RPI4 Raspbian 64 bit & LinuxCNC

More
10 Sep 2023 21:53 #280436 by rodw

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

Only if the dependencies are listed in the debian control file by the developer of the .deb file
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.

More
11 Sep 2023 05:20 - 11 Sep 2023 05:20 #280452 by Donno
gpioinfo gives output i can read and write GPIO pins in terminal.

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.

More
11 Sep 2023 09:35 #280464 by andypugh

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.

More
11 Sep 2023 09:39 #280465 by andypugh

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.

More
11 Sep 2023 10:47 #280468 by Donno
Base thread gave me error so i used servo thread :
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.
The following user(s) said Thank You: rodw, cornholio

Please Log in or Create an account to join the conversation.

More
11 Sep 2023 11:19 #280469 by rodw
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.

Please Log in or Create an account to join the conversation.

More
11 Sep 2023 12:12 #280473 by Donno
I did not install gpiod.
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
11 Sep 2023 12:42 #280475 by cornholio
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.

Please Log in or Create an account to join the conversation.

More
11 Sep 2023 14:10 #280479 by andypugh
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.

More
11 Sep 2023 20:28 #280494 by rodw

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 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 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
Powered by Kunena Forum