Pi5 MESA 7c80: mesaflash can't see the card.

More
1 year 9 months ago #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.
 

Please Log in to join the conversation.

More
1 year 9 months ago #317996 by ccatlett1984

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.

Please Log in to join the conversation.

More
1 year 9 months ago #317997 by PCW
You should be able to with the latest mesaflash

Please Log in to join the conversation.

More
1 year 9 months ago #317998 by ccatlett1984

You should be able to with the latest mesaflash
alright, putting the pi4 back in, let me know what needs done.

Please Log in to join the conversation.

More
1 year 9 months ago #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
 

Please Log in to join the conversation.

More
1 year 9 months ago #318001 by ccatlett1984

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 to join the conversation.

More
1 year 9 months ago #318003 by ccatlett1984

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.
Code:
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
Code:
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:/$

Please Log in to join the conversation.

More
1 year 9 months ago #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)
 

Please Log in to join the conversation.

More
1 year 9 months ago #318008 by Cant do this anymore bye all
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 to join the conversation.

More
1 year 9 months ago #318010 by ccatlett1984

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
Code:
pi@linuxcnc:/dev$ ls spi* spidev0.0  spidev0.1  spidev10.0

Here is the mesaflash output.
Code:
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 to join the conversation.

Time to create page: 0.123 seconds
Powered by Kunena Forum