Rpi4 HAL question
18 Aug 2021 12:54 #218071
by CatoFu
Rpi4 HAL question was created by CatoFu
Hello,
I am a beginner of LinuxCNC and trying to set up a machine with Rpi4 and prefer to use its GPIO for pulse generator just for my understanding LinuxCNC architecture.
I installed
www.linuxcnc.org/iso/linuxcnc-2.8.1-pi4.zip
and
github.com/LinuxCNC/linuxcnc/blob/master...hal_pi_gpio_demo.hal
.
The hal_pi_gpio_demo.hal works and I confirmed each axis step pulses are generated.
In the file, there is a line that I cannot understand, which is
loadrt hal_pi_gpio dir=78855 exclude=32918520
.
I understand loadrt hal_pi_gpio, but do not dir=78855 exclude=32918520.
Could anyone please explain what the numbers mean?
Thank you
Cato
I am a beginner of LinuxCNC and trying to set up a machine with Rpi4 and prefer to use its GPIO for pulse generator just for my understanding LinuxCNC architecture.
I installed
www.linuxcnc.org/iso/linuxcnc-2.8.1-pi4.zip
and
github.com/LinuxCNC/linuxcnc/blob/master...hal_pi_gpio_demo.hal
.
The hal_pi_gpio_demo.hal works and I confirmed each axis step pulses are generated.
In the file, there is a line that I cannot understand, which is
loadrt hal_pi_gpio dir=78855 exclude=32918520
.
I understand loadrt hal_pi_gpio, but do not dir=78855 exclude=32918520.
Could anyone please explain what the numbers mean?
Thank you
Cato
Please Log in or Create an account to join the conversation.
18 Aug 2021 15:29 #218078
by PCW
Replied by PCW on topic Rpi4 HAL question
What does the manual page for hal_pi_gpio say?
I suspect those numbers are masks that set which GPIO pins are outputs (dir)
and which GPIO setup bits to leave unchanged (excluded)
The numbers would make more sense in hexadecimal
I suspect those numbers are masks that set which GPIO pins are outputs (dir)
and which GPIO setup bits to leave unchanged (excluded)
The numbers would make more sense in hexadecimal
Please Log in or Create an account to join the conversation.
18 Aug 2021 19:36 #218090
by elovalvo
Look this post
forum.linuxcnc.org/27-driver-boards/3770...erry-pi-gpios#157180
Replied by elovalvo on topic Rpi4 HAL question
Hello,
I am a beginner of LinuxCNC and trying to set up a machine with Rpi4 and prefer to use its GPIO for pulse generator just for my understanding LinuxCNC architecture.
I installed
www.linuxcnc.org/iso/linuxcnc-2.8.1-pi4.zip
and
github.com/LinuxCNC/linuxcnc/blob/master...hal_pi_gpio_demo.hal
.
The hal_pi_gpio_demo.hal works and I confirmed each axis step pulses are generated.
In the file, there is a line that I cannot understand, which is
loadrt hal_pi_gpio dir=78855 exclude=32918520
.
I understand loadrt hal_pi_gpio, but do not dir=78855 exclude=32918520.
Could anyone please explain what the numbers mean?
Thank you
Cato
Look this post
forum.linuxcnc.org/27-driver-boards/3770...erry-pi-gpios#157180
Please Log in or Create an account to join the conversation.
19 Aug 2021 13:02 #218140
by CatoFu
Replied by CatoFu on topic Rpi4 HAL question
Hello PCW,
Thank you for your help.
Now I understand what the number means.
As you mentioned there are some lines which commented out on the file.
It says;
# 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 1 1 1 dir mask (0 means in 1 means out) dec 78855
# 0 1 1 1 1 1 0 1 1 0 0 1 0 0 1 0 1 1 1 1 1 1 1 0 0 0 exclude mask (0 means use 1 means dont use) dec 32918520
I did not even know what the dec means and now I have leaned.
Thank you so much!
Have a good day!
Cato
Thank you for your help.
Now I understand what the number means.
As you mentioned there are some lines which commented out on the file.
It says;
# 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 1 1 1 dir mask (0 means in 1 means out) dec 78855
# 0 1 1 1 1 1 0 1 1 0 0 1 0 0 1 0 1 1 1 1 1 1 1 0 0 0 exclude mask (0 means use 1 means dont use) dec 32918520
I did not even know what the dec means and now I have leaned.
Thank you so much!
Have a good day!
Cato
Please Log in or Create an account to join the conversation.
16 Oct 2021 07:51 #223282
by diy
Replied by diy on topic Rpi4 HAL question
Write software, you can try
Please Log in or Create an account to join the conversation.
16 Oct 2021 07:55 #223283
by diy
Replied by diy on topic Rpi4 HAL question
download
Please Log in or Create an account to join the conversation.
17 Oct 2021 14:36 #223383
by CatoFu
Replied by CatoFu on topic Rpi4 HAL question
Thank you elovalvo!
Cato
Cato
Please Log in or Create an account to join the conversation.
17 Oct 2021 14:37 #223384
by CatoFu
Replied by CatoFu on topic Rpi4 HAL question
Thank you diy!
I will try it.
I will try it.
Please Log in or Create an account to join the conversation.
- ChanceTran
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
19 Oct 2021 15:22 #223566
by ChanceTran
Replied by ChanceTran on topic Rpi4 HAL question
Hi.....I had a similar inquiry. Just honestly, would you say you are saying that there is still no rest mode for the Pi 4?
Absence of a genuine rest mode is the thing that's kept me from utilizing a Pi for a very long time in the course of the most recent few years - it essentially forestalls battery-fueled applications. Is there some endemic component that would be broken by adding a genuine profound rest mode, one that doesn't need closure or end? Is the Pi just continually going to be that way?
Absence of a genuine rest mode is the thing that's kept me from utilizing a Pi for a very long time in the course of the most recent few years - it essentially forestalls battery-fueled applications. Is there some endemic component that would be broken by adding a genuine profound rest mode, one that doesn't need closure or end? Is the Pi just continually going to be that way?
Please Log in or Create an account to join the conversation.
19 Oct 2021 23:05 #223602
by BigJohnT
Replied by BigJohnT on topic Rpi4 HAL question
I have a configuration tool for this, 64 bit today but soon to add a 32 bit.
github.com/jethornton/rpi_gpio
JT
github.com/jethornton/rpi_gpio
JT
The following user(s) said Thank You: elovalvo
Please Log in or Create an account to join the conversation.
Time to create page: 0.098 seconds