EOI in getting SPI going on the RPi5 solved read First post for updated info

More
2 years 4 months ago #303044 by Cant do this anymore bye all
Sorry I haven't, I changed the interface on my Mesa board copy to EPP and put the RPi5 in a drawer.

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

More
2 years 4 months ago - 2 years 4 months ago #303757 by elovalvo

Has anyone tried the hal_gpio driver on Pi5? (I don't think that I have)

The latest version of LinuxCNC 2.9.2 you can find here
forum.linuxcnc.org/9-installing-linuxcnc...pi-5?start=40#303752
keeps giving these errors:
Code:
pi@raspberrypi:~ $ halrun -I halcmd: loadrt hal_pi_gpio Note: Using POSIX realtime Raspberry Pi 5 Model B Rev 1.0 found The Pi model 23 is not known to work with this driver but will be assumed to be be using the RPi2+ layout 40 pin connector HAL_PI_GPIO: can't open /dev/gpiomem:  2 - No such file or directory If the error is 'permission denied' then try adding the user who runs LinuxCNC to the gpio group: sudo gpasswd -a username gpio HAL_PI_GPIO: can't open /dev/mem:  13 - Permission denied hal_pi_gpio: rtapi_app_main: Operation not permitted (-1) <stdin>:1: waitpid failed /usr/bin/rtapi_app hal_pi_gpio <stdin>:1: /usr/bin/rtapi_app exited without becoming ready <stdin>:1: insmod for hal_pi_gpio failed, returned -1 halcmd:

Instead the hal_gpio module show this
Code:
pi@raspberrypi:~ $ halrun -I halcmd: loadrt hal_gpio inputs=GPIO6,GPIO12,GPIO13,GPIO16,GPIO17,GPIO18,GPIO19 \ halcmd+: outputs=GPIO20,GPIO21,GPIO22,GPIO23,GPIO24,GPIO25,GPIO26,GPIO27 \ halcmd+: invert=GPIO20,GPIO27 \ halcmd+: reset=GPIO21,GPIO22 Note: Using POSIX realtime halcmd: show pin Component Pins: Owner Type Dir Value Name 4 bit OUT FALSE hal_gpio.GPIO12-in 4 bit OUT FALSE hal_gpio.GPIO12-in-not 4 bit OUT FALSE hal_gpio.GPIO13-in 4 bit OUT FALSE hal_gpio.GPIO13-in-not 4 bit OUT FALSE hal_gpio.GPIO16-in 4 bit OUT FALSE hal_gpio.GPIO16-in-not 4 bit OUT FALSE hal_gpio.GPIO17-in 4 bit OUT FALSE hal_gpio.GPIO17-in-not 4 bit OUT FALSE hal_gpio.GPIO18-in 4 bit OUT FALSE hal_gpio.GPIO18-in-not 4 bit OUT FALSE hal_gpio.GPIO19-in 4 bit OUT FALSE hal_gpio.GPIO19-in-not 4 bit IN FALSE hal_gpio.GPIO20-out 4 bit IN FALSE hal_gpio.GPIO21-out 4 bit IN FALSE hal_gpio.GPIO22-out 4 bit IN FALSE hal_gpio.GPIO23-out 4 bit IN FALSE hal_gpio.GPIO24-out 4 bit IN FALSE hal_gpio.GPIO25-out 4 bit IN FALSE hal_gpio.GPIO26-out 4 bit IN FALSE hal_gpio.GPIO27-out 4 bit OUT FALSE hal_gpio.GPIO6-in 4 bit OUT FALSE hal_gpio.GPIO6-in-not 4 s32 OUT 0 hal_gpio.read.time 4 s32 OUT 0 hal_gpio.reset.time 4 s32 OUT 0 hal_gpio.write.time halcmd:
Last edit: 2 years 4 months ago by elovalvo.

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

More
2 years 4 months ago #303759 by Cant do this anymore bye all
Anything written for the RPi that is specific for the RPi4 and earlier is not expected to work due to the RPi5 having the RP1 chip that handles the GPIO and most of the other external interfaces.
Basically if the driver depends on the bcm2835 header it won’t work on the RPi5.

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

More
2 years 4 months ago #303784 by rodw
I am sure the hal_gpio driver was tested and working very early in the piece from earlier forum comments.
linuxcnc.org/docs/stable/html/drivers/hal_gpio.html
The gpiod library used here is meant to be a generic GPIO driver (I think at the kernel level) that is designed to be multi platform so its unsurprising it works on the Pi5

But this does not appear to help with SPI unless its supported by gpoid

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

More
2 years 4 months ago #303797 by Cant do this anymore bye all
I had a look at the repo that a previous post referred to, it appears that it would work. I just have to get off the lazy backside and have a go. Although I guess I’ll have to do the testing myself based on previous experience.
But I need to finish a side project or 2 lol.

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

More
2 years 4 months ago - 2 years 4 months ago #303816 by rodw
Just looked at that earlier repo
forum.linuxcnc.org/18-computer/51748-eoi...-rpi5?start=0#294929
That appears to be the same raspberry pi kernel and branch I compile for the images on the downloads page.
So does that mean the Pi5 has had SPI support all along?
Last edit: 2 years 4 months ago by rodw.

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

Time to create page: 0.470 seconds
Powered by Kunena Forum