RPI4 Raspbian 64 bit & LinuxCNC

More
3 years 1 month ago #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 to join the conversation.

More
3 years 1 month ago #280452 by Donno
gpioinfo gives output i can read and write GPIO pins in terminal.

Code:
Did you remember to add the hal_gipo read and write functions to a thread?


Can you please show example ?

Please Log in to join the conversation.

More
3 years 1 month ago #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.

Please Log in to join the conversation.

More
3 years 1 month ago #280465 by andypugh

Code:
Can you please show example ?
Code:
addf hal_gpio.read base-thread addf hal_gpio.write base-thread addf hal_gpio.reset base-thread

Please Log in to join the conversation.

More
3 years 1 month ago #280468 by Donno
Base thread gave me error so i used servo thread :
Code:
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 to join the conversation.

More
3 years 1 month ago #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 to join the conversation.

More
3 years 1 month ago #280473 by Donno
I did not install gpiod.

Please Log in to join the conversation.

More
3 years 1 month ago #280475 by Cant do this anymore bye all
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 to join the conversation.

More
3 years 1 month ago #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 to join the conversation.

More
3 years 1 month ago #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 to join the conversation.

Time to create page: 0.185 seconds
Powered by Kunena Forum