Rpi5 spi woes

More
2 years 11 months ago #285681 by Cant do this anymore bye all
Trying to get a 7i90 talking to RPi-5
Image used 2023-10-10-raspios-bookworm-arm64
Linuxcnc was installed from the debian repo
RT kernel boots and can run latency test fine, everything seems to as it should
member of spi group

but.. running on the RPi-5 ( /dev/spidev0.1 is correct)
Code:
mesaflash --device 7i90 --addr /dev/spidev0.1 --spi --readhmid Configuration Name: HOSTMOT2 General configuration information:   BoardName :   FPGA Size: 0 KGates   FPGA Pins: 0   Number of IO Ports: 0   Width of one I/O port: 0   Clock Low frequency: 0.0000 MHz   Clock High frequency: 0.0000 MHz   IDROM Type: 2416523085   Instance Stride 0: 0   Instance Stride 1: 0   Register Stride 0: 0   Register Stride 1: 0 Modules in configuration: Configuration pin-out:

Obviously I can't get Linuxcnc to start a know good config.

Downloaded the latest mesaflash from git , built that but no luck.

Went back to my RP-400 that I know works (just to make sure the FPGA ok), and all was good, start a config ok, sees my 7i73, mesaflash works as expected.

spi_bcm2835 loads on both machines when booted.

Any suggestions.....I know this is new hardware and there may not be an answer yet.

Hmmm just noticed something snippet from RP-400 below, "is unable to set bpw32, fallback to bpw8" a factor, not seen on the RPi-5 output
Code:
  mesaflash --device 7i90 --addr /dev/spidev0.0 --spi --readhmid unable to set bpw32, fallback to bpw8 Configuration Name: HOSTMOT2 General configuration information: BoardName : MESA7I90 FPGA Size: 9 KGates FPGA Pins: 144 Number of IO Ports: 3 Width of one I/O port: 24 Clock Low frequency: 100.0000 MHz Clock High frequency: 200.0000 MHz IDROM Type: 3 Instance Stride 0: 4 Instance Stride 1: 64 Register Stride 0: 256 Register Stride 1: 256

 

Please Log in to join the conversation.

More
2 years 11 months ago #285693 by Cant do this anymore bye all
Little update, playing around with the mesaflash source to force 8 bits per word works with mesaflash able to do a successful --readhmid & --sserial.

Now to hm2_rpspi
Code:
halrun halcmd: loadrt hostmot2 Note: Using POSIX realtime hm2: loading Mesa HostMot2 driver version 0.15 halcmd: loadrt hm2_rpspi hm2_rpspi: Can't map peripherals hm2_rpspi: cannot map peripheral memory. hm2_rpspi: rtapi_app_main: Invalid argument (-22) <stdin>:2: waitpid failed /usr/bin/rtapi_app hm2_rpspi <stdin>:2: /usr/bin/rtapi_app exited without becoming ready <stdin>:2: insmod for hm2_rpspi failed, returned -1 halcmd:

Need to find out what happening here, a little above my skills.

Please Log in to join the conversation.

More
2 years 11 months ago #285700 by rodw
Replied by rodw on topic Rpi5 spi woes
post in the driver boards setting and PCW may come to the resue.

Please Log in to join the conversation.

More
2 years 11 months ago #285701 by Cant do this anymore bye all
I think it maybe related to 32 bit versus 8 bit reads. At least that was the issue with mesaflash.

Please Log in to join the conversation.

Time to create page: 5.851 seconds
Powered by Kunena Forum