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

More
2 years 7 months ago - 2 years 7 months ago #295581 by Cant do this anymore bye all
Great find pip

Tho I did try
"Write some data to, and read some data from a slave device using the registers"

But couldn't get this line to compile ;)
Last edit: 2 years 7 months ago by Cant do this anymore bye all.

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

More
2 years 7 months ago #295582 by Cant do this anymore bye all

I have been working (playing) with Rpi5 and Bookworm with preempt_rt. I have preempt_rt running on RPi4 and RPi5 (separate compiles). The RPi4 uses bcm2711_defconfig while the RPi5 uses bcm2712_defconfig. I have kernel version 6.6.20-rt25-v8 (-4k+ on the RPi4) and (-16k+ on the RPI5).
In the last couple of weeks they have added support for spi CS for additional cs pins. I am currently running the kernel on Raspian Bookworm but I have previously used the same sources to compile kernels on straight debian. If anyone is interested, I will put my sources up on my GitHub.
For awhile I was having difficulty getting the kernels to load but now I seem to have the process down. I will try shortly loading the kernel on the linuxcnc image for RPi5 to verify that the same kernel will run on both debian and raspian bookworm.

There is no issue with kernels or images that can run Linuxcnc on the RPi 5. That had been sorted wayback in Nov\Dec.
The issue is due to the RP1 the RPi4 driver is not compatible with RPi5. It doesn’t matter what changes are made to the kernel the current hm2-rpspi driver can’t be used with the RPi5. A new driver needs to be written to suit the new hardware.
The whole point of this thread was to try and generate some interest, which hasn’t really happened. So it would seem there are other priorities, so patience is the key.
Spidev is not the answer, I have tried and the speed in the context of a servo thread isn’t there.

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

More
2 years 7 months ago - 2 years 7 months ago #295590 by Calysto
Super!! I'm enthusiastic! I have a PI5 doing nothing and a 7C80 (now working with a PI4). The PI5 is sooooo much faster, so I would like to use my 5 with my SPI-interface-mesa-card.

I'm not a programmer, but I can test things on a real machine. I might give you acces to it, if that is helpful... (while keeping the motors off :-))
 
Last edit: 2 years 7 months ago by Calysto.

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

More
2 years 4 months ago #302962 by bpaut
How do I use spi on the rpi5, spidev hasn't been updated since 2022, before the rpi5 came out. Ive used spidev and it works half the time, but also get threading errors.

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

More
2 years 4 months ago #303031 by Cant do this anymore bye all
The spidev driver is not an option. The man page in the docs states that it is not suitable for real-time threads. Hence the reason you are having issues.

To put it clearly SPI, atm is not an option for the RPi5, no matter what the download page states. Mesa states that the RPi5 is unable to be used with the 7c80 & 7c81 on the respective product pages.
The Raspberry Foundation has only released limited information regarding the RP1 chip. So until this issue resolved we are stuck.
Whether a driver will be developed I can not say.
Long story short there is no help currently available.
To use the RPi5 with Linuxcnc the Ethernet port with a Mesa card would be the easiest route. The gpios may be an option but I haven’t tried it. I’m unsure if on of the Mesa PCIe cards would work, it would be an expensive experiment. A PCIe Parallel Port adapter is not an option, Jeff Gerling has tested many PCIe cards with the RPi and the arm architecture doesn’t support BAR has needed by Parallel Port cards.
It’s not just Linuxcnc that the RPi5 has been a bit of a letdown, many other people have found that many of the old libraries that use the various peripherals on the gpios don’t work until the libs have been re written and the apps & code that use them.
We just have to wait for the Code Gods to arrive.

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

More
2 years 4 months ago #303037 by andypugh
Has anyone tried the hal_gpio driver on Pi5? (I don't think that I have)

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

Time to create page: 0.102 seconds
Powered by Kunena Forum