Pi5 MESA 7c80 WORKING

More
04 Jan 2025 00:16 #317994 by PCW
I apologize, this is my fault, some production 7C80 cards ended up with
the wrong firmware. We can issue you a RMA for reflashing the card with
correct firmware. Sorry for the inconvenience.
 
The following user(s) said Thank You: cornholio

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

More
04 Jan 2025 00:19 - 04 Jan 2025 00:21 #317996 by ccatlett1984
Replied by ccatlett1984 on topic Pi5 MESA 7c80: mesaflash can't see the card.

I apologize, this is my fault, some production 7C80 cards ended up with
the wrong firmware. We can issue you a RMA for reflashing the card with
correct firmware. Sorry for the inconvenience.

 
So, since i have a pi4 that can see the card, is it possible for me to flash the correct firmware?

I'd much rather not kill a week plus in cross shipping.

I'd like to try it here if it doesn't require super-specialized equipment, I've made JTAG cables before.
Last edit: 04 Jan 2025 00:21 by ccatlett1984.

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

More
04 Jan 2025 00:20 #317997 by PCW
You should be able to with the latest mesaflash

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

More
04 Jan 2025 00:24 #317998 by ccatlett1984
Replied by ccatlett1984 on topic Pi5 MESA 7c80: mesaflash can't see the card.

You should be able to with the latest mesaflash

alright, putting the pi4 back in, let me know what needs done.

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

More
04 Jan 2025 00:30 - 04 Jan 2025 00:31 #317999 by PCW
If you can reliably access the card on the RPI4, you would

sudo mesaflash --device 7c80 --spi --addr /dev/spidev0.0 --write 7c80d.bit
sudo mesaflash --device 7c80 --spi --addr /dev/spidev0.0 --write 7c80fall.bit --fallback

(7c80d.bit and 7c80fall.bit are in the 7c80.zip file in /configs/hostmot2/)
the zip file is available from the store in the card specification tab
 
Last edit: 04 Jan 2025 00:31 by PCW.
The following user(s) said Thank You: ccatlett1984

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

More
04 Jan 2025 01:12 #318001 by ccatlett1984
Replied by ccatlett1984 on topic Pi5 MESA 7c80: mesaflash can't see the card.

If you can reliably access the card on the RPI4, you would

sudo mesaflash --device 7c80 --spi --addr /dev/spidev0.0 --write 7c80d.bit
sudo mesaflash --device 7c80 --spi --addr /dev/spidev0.0 --write 7c80fall.bit --fallback

(7c80d.bit and 7c80fall.bit are in the 7c80.zip file in /configs/hostmot2/)
the zip file is available from the store in the card specification tab

 

From Pi4, dump of mesaflash BEFORE flashing: pastebin.com/kf8iUXQY
dump of mesaflash AFTER flashing: pastebin.com/5xm8FHpq

I forced a --reload in between each flash cmd, to validate the card took the firmware before moving on.

If this looks correct, I will proceed to swapping the pi5 back into the machine.

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

More
04 Jan 2025 01:36 - 04 Jan 2025 01:51 #318003 by ccatlett1984
Replied by ccatlett1984 on topic Pi5 MESA 7c80: mesaflash can't see the card.

If you can reliably access the card on the RPI4, you would

sudo mesaflash --device 7c80 --spi --addr /dev/spidev0.0 --write 7c80d.bit
sudo mesaflash --device 7c80 --spi --addr /dev/spidev0.0 --write 7c80fall.bit --fallback

(7c80d.bit and 7c80fall.bit are in the 7c80.zip file in /configs/hostmot2/)
the zip file is available from the store in the card specification tab

 
From Pi4, dump of mesaflash BEFORE flashing: pastebin.com/kf8iUXQY
dump of mesaflash AFTER flashing: pastebin.com/5xm8FHpq

I forced a --reload in between each flash cmd, to validate the card took the firmware before moving on.

If this looks correct, I will proceed to swapping the pi5 back into the machine.

Update: Post flashing, with the Pi5 - halcmd sees the card.
pi@linuxcnc:/$ sudo mesaflash --device 7c80 --addr /dev/spidev0.0 --spi --readhmid [sudo] password for pi: open: No such file or directory No 7C80 board found
in /dev/ only a single spi entry exists "spidev10.0"
running mesaflash (using the above spi entry) results in the following
pi@linuxcnc:/$ sudo mesaflash --device 7c80 --addr /dev/spidev10.0 --spi --readhmid
Unexpected cookie at 0100..0110:
ffffffff ffffffff ffffffff
No 7C80 board found
pi@linuxcnc:/$

Last edit: 04 Jan 2025 01:51 by ccatlett1984.

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

More
04 Jan 2025 01:51 - 04 Jan 2025 01:54 #318005 by PCW
You need to enable spidev0.0 by turning SPI on in the boot/broadcom/config.txt file

(I have no idea what pins spidev10.0 connects to)
 
Last edit: 04 Jan 2025 01:54 by PCW.

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

More
04 Jan 2025 02:03 #318008 by cornholio
Replied by cornholio on topic Pi5 MESA 7c80: mesaflash can't see the card.
You need to enable the SPI in config.txt and reboot, it is under the boot folder but the folder have slightly different names to a std Raspbian OS.
If the 7c80 is similar to the 7c81 the spi pins are hardwired to the first spi port on the first spi interface.

linuxcnc.org/docs/html/man/man9/hm2_rpspi.9.html

The hm2_spix is pretty much the same. As you can see from the above the SPI signals are hardwired.

If the SPI circuit of the 7c80 is based on the 7c81 design:
Basically without creating a custom cable (which I mentioned previously) the only SPI interface is using the following pins
MOSI=10(19), MISO=9(21), SCLK=11(23), CE0=8(24)

To tell the truth I'm not even sure spidev10.0 is for end user use. I think the only pins exposed on the 40 pin header are for spidev1.xx & spidev0.xx

The reason the card will be seen when using halcmd is that the hm2_spix driver takes full control of the hardware regarding the spi pins. To put it simply it replaces the kernel module that handles spi hardware.

Summarizing:
Mesaflash requires the devnodes for spi to be created by the kernel. Which physically limited to /dev/spidev0.0

hm2_rpspi & hm2_spix don't use the dev nodes as the setup for the GPIO is done by the Linuxcnc driver. Yet phsycially physically limited to the GPIOS associated with /dev/spidev0.0
Without specifying a spi interface it will default to the hardware (GPIO pins) associated with /dev/spidev0.0
An alternate interface can be specified but the physical connections between the RPi and the Mesa board need to be changed to suit. ie CS, CLK,MISO& MOSI will be the same at the mesa end but will need changing at the RPi end.

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

More
04 Jan 2025 02:27 #318010 by ccatlett1984
Replied by ccatlett1984 on topic Pi5 MESA 7c80: mesaflash can't see the card.

You need to enable spidev0.0 by turning SPI on in the boot/broadcom/config.txt file

(I have no idea what pins spidev10.0 connects to)

 

Thought that would have been already enabled in the downloaded image...
I enabled it in /boot/broadcom/config.txt
here is the output
pi@linuxcnc:/dev$ ls spi*
spidev0.0  spidev0.1  spidev10.0

Here is the mesaflash output.
pi@linuxcnc:~$ sudo mesaflash --device 7c80 --addr /dev/spidev1.0 --spi --readhmid
open: No such file or directory
No 7C80 board found
pi@linuxcnc:~$ sudo mesaflash --device 7c80 --addr /dev/spidev10.0 --spi --readhmid
Unexpected cookie at 0100..0110:
ffffffff ffffffff ffffffff
No 7C80 board found
pi@linuxcnc:~$ sudo mesaflash --device 7c80 --addr /dev/spidev0.0 --spi --readhmid
Configuration Name: HOSTMOT2

General configuration information:

  BoardName : MESA7C80
  FPGA Size: 9 KGates
  FPGA Pins: 144
  Number of IO Ports: 2
  Width of one I/O port: 27
  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 or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.076 seconds
Powered by Kunena Forum