Raspberry Pi5 GPIO setup

More
06 Feb 2025 20:00 #320838 by Wagon56
Raspberry Pi5 GPIO setup was created by Wagon56
Hello everyone, ive been trying to set up linuxcnc to work with my Raspberrypi 5 for a week or two now, ive gotten to a point where i can load the hal_pi_gpio driver with no errors showing up, i have a config running in linuxcnc and i can see in halshow that the pins are activating and deactivating, the issue i have is that the pins only activate and deactivate in the software and not physically, i cannot measure any difference on the physical pin itself, i can use gpioset command to set the pins to high or low manually and that works well, but as soon as i try setting it to high/low using halcmd it just doesnt change state, i would greatly appreciate some assistance in setting this up correctly.

The hal file below was given as an example somewhere online, dont remember exactly where i got it but it is as mentioned supposed to work considering that halshow shows the pins and the fact that they should be changing state.
Attachments:

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

More
06 Feb 2025 20:16 #320840 by scotta
Replied by scotta on topic Raspberry Pi5 GPIO setup
Looking at the source for hal_pi_gpio it's setup for the BCM2835 (RPi 4). The RPi 5 uses the new RP1 southbridge chip for IO.

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

More
06 Feb 2025 20:42 #320846 by Wagon56
Replied by Wagon56 on topic Raspberry Pi5 GPIO setup
I see, what do i need to do to get it configured for the RP1? Might be a very obvious answer but im a newbie and dont really yet know exactly what im doing.

Do i have to do anything other than redoing the hal file? This issue seems to be a bit deeper than just the hal file (or atleast thats what makes ΔΊ
sense to me)

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

More
06 Feb 2025 21:05 #320850 by unknown
Replied by unknown on topic Raspberry Pi5 GPIO setup
This may be a starting point
forum.linuxcnc.org/9-installing-linuxcnc...i-5?start=350#320817

But continue reading, as the user did make a few mistakes in the hal file, but these were pointed out in the next post. May not be exactly want you want, being 6 aixs, but it's a starting point.

But yeah it's hal_gpio for the PI5
linuxcnc.org/docs/devel/html/drivers/hal_gpio.html

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

More
06 Feb 2025 21:18 #320853 by Wagon56
Replied by Wagon56 on topic Raspberry Pi5 GPIO setup
Awesome, thanks, will take a look and see what i can fix, i dont think setting up a config for 6 axis will be a big problem once i actually get the gpio stuff working

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

More
06 Feb 2025 21:23 #320854 by unknown
Replied by unknown on topic Raspberry Pi5 GPIO setup
The config the user posted was for a 6 axis machine. If that's what you need it should be good to go once you correct the couple of mistakes.

If I may ask, once you have the basic config working, could you attach the files to this thread. As I attempting to have a one stop thread with a heap of info.
forum.linuxcnc.org/9-installing-linuxcnc...the-rpasberry-pi-4-5

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

More
06 Feb 2025 21:26 #320855 by Wagon56
Replied by Wagon56 on topic Raspberry Pi5 GPIO setup
Yeah for sure, i was gonna make a little setup guide as soon as i have it done correctly so i dont have to do all the research again in the future, might aswell post it all on here for everyone that has similar issues
The following user(s) said Thank You: unknown

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

More
06 Feb 2025 22:25 #320860 by Wagon56
Replied by Wagon56 on topic Raspberry Pi5 GPIO setup
Dude damn that worked actually, below you will find a functioning config for the pi5 which is based on the link provided above, time to get some drivers hooked up
Attachments:
The following user(s) said Thank You: unknown

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

Time to create page: 0.062 seconds
Powered by Kunena Forum