Raspberry Pi 4 & MESA 7i92

More
12 Feb 2020 17:14 #157195 by PCW
Replied by PCW on topic Raspberry Pi 4 & MESA 7i92
did you try:

mesaflash --help

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

More
12 Feb 2020 17:19 - 12 Feb 2020 17:24 #157198 by ajsinfotech
Yep! Works like a charm.

And I try this:
./mesaflash --device 7c81 --addr /dev/spidev0.0 --spi --readhmid

And throws this:
unable to set bpw32, fallback to bpw8
Configuration Name: HOSTMOT2

General configuration information:

BoardName : MESA7C81
FPGA Size: 9 KGates
FPGA Pins: 144
Number of IO Ports: 3
Width of one I/O port: 19
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

Modules in configuration:

Module: DPLL
There are 1 of DPLL in configuration
Version: 0
Registers: 7
BaseAddress: 7000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Module: WatchDog
There are 1 of WatchDog in configuration
Version: 0
Registers: 3
BaseAddress: 0C00
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Module: IOPort
There are 3 of IOPort in configuration
Version: 0
Registers: 5
BaseAddress: 1000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Module: QCount
There are 1 of QCount in configuration
Version: 2
Registers: 5
BaseAddress: 3000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Module: SSerial
There are 1 of SSerial in configuration
Version: 0
Registers: 6
BaseAddress: 5B00
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 64 bytes

Module: StepGen
There are 10 of StepGen in configuration
Version: 2
Registers: 10
BaseAddress: 2000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Module: PWM
There are 3 of PWM in configuration
Version: 0
Registers: 5
BaseAddress: 4100
ClockFrequency: 200.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Module: LED
There are 1 of LED in configuration
Version: 0
Registers: 1
BaseAddress: 0200
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Configuration pin-out:

IO Connections for P1+Serial
Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir

0 0 IOPort PWM 0 PWM (Out)
0 1 IOPort None
0 2 IOPort StepGen 0 Step/Table1 (Out)
0 3 IOPort None
0 4 IOPort StepGen 0 Dir/Table2 (Out)
0 5 IOPort None
0 6 IOPort StepGen 1 Step/Table1 (Out)
0 7 IOPort None
0 8 IOPort StepGen 1 Dir/Table2 (Out)
0 9 IOPort StepGen 2 Step/Table1 (Out)
0 10 IOPort StepGen 2 Dir/Table2 (Out)
0 11 IOPort StepGen 3 Step/Table1 (Out)
0 12 IOPort StepGen 3 Dir/Table2 (Out)
0 13 IOPort None
0 14 IOPort QCount 0 Quad-A (In)
0 15 IOPort QCount 0 Quad-B (In)
0 16 IOPort QCount 0 Quad-IDX (In)
0 17 IOPort SSerial 0 TXData0 (Out)
0 18 IOPort SSerial 0 TXData1 (Out)

IO Connections for P2+Serial
Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir

0 19 IOPort PWM 1 PWM (Out)
0 20 IOPort None
0 21 IOPort StepGen 4 Step/Table1 (Out)
0 22 IOPort None
0 23 IOPort StepGen 4 Dir/Table2 (Out)
0 24 IOPort None
0 25 IOPort StepGen 5 Step/Table1 (Out)
0 26 IOPort None
0 27 IOPort StepGen 5 Dir/Table2 (Out)
0 28 IOPort StepGen 6 Step/Table1 (Out)
0 29 IOPort StepGen 6 Dir/Table2 (Out)
0 30 IOPort None
0 31 IOPort None
0 32 IOPort None
0 33 IOPort None
0 34 IOPort None
0 35 IOPort None
0 36 IOPort SSerial 0 TXEn0 (Out)
0 37 IOPort SSerial 0 TXEn1 (Out)

IO Connections for P7+Serial
Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir

0 38 IOPort PWM 2 PWM (Out)
0 39 IOPort None
0 40 IOPort StepGen 7 Step/Table1 (Out)
0 41 IOPort None
0 42 IOPort StepGen 7 Dir/Table2 (Out)
0 43 IOPort None
0 44 IOPort StepGen 8 Step/Table1 (Out)
0 45 IOPort None
0 46 IOPort StepGen 8 Dir/Table2 (Out)
0 47 IOPort StepGen 9 Step/Table1 (Out)
0 48 IOPort StepGen 9 Dir/Table2 (Out)
0 49 IOPort None
0 50 IOPort None
0 51 IOPort None
0 52 IOPort None
0 53 IOPort None
0 54 IOPort None
0 55 IOPort SSerial 0 RXData0 (In)
0 56 IOPort SSerial 0 RXData1 (In)

So I think the connectivity is ok. But I don't understand this part:
unable to set bpw32, fallback to bpw8 (maybe something wrong)

Anyway, I don't know what's next to get all the pieces together.
Last edit: 12 Feb 2020 17:24 by ajsinfotech.

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

More
12 Feb 2020 17:43 - 12 Feb 2020 17:44 #157200 by PCW
Replied by PCW on topic Raspberry Pi 4 & MESA 7i92

unable to set bpw32, fallback to bpw8 (maybe something wrong)


Just means the device driver or RPI hardware does not support 32 bits per word mode,
only byte mode. This does not affect operation (other than perhaps being a bit slower).

To write to the flash EEPROM on a 7C81, you use the --write command
Last edit: 12 Feb 2020 17:44 by PCW.

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

More
12 Feb 2020 17:57 - 12 Feb 2020 18:05 #157202 by ajsinfotech

unable to set bpw32, fallback to bpw8


Ok, thanks for the explanation!

I did it, but it didn't work:

./mesaflash --device 7c81 --addr /dev/spidev0.0 --write 7c81_5abobx2d.bit

The command fails, it throws:
ERROR: you must select transport layer for board
No 7C81 board found

Do I have to install a driver?
I mean something like:

sudo apt−get install hostmot2−firmware−7c81

Because I tried, but no package found.
Last edit: 12 Feb 2020 18:05 by ajsinfotech.

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

More
12 Feb 2020 18:40 #157206 by PCW
Replied by PCW on topic Raspberry Pi 4 & MESA 7i92
From mesaflash help:

--spi Use SPI interface to connect to board, only for boards
with multiple interfaces (7c80, 7c81, 7i43, 7i90, 7i64).

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

More
13 Feb 2020 13:19 #157283 by ajsinfotech
Finally the command runs ok and I can flash the board.
Thanks PCW!

This is the command I test (to the people like me :unsure: ):

./mesaflash --device 7C81 --addr /dev/spidev0.0 --spi --write 7c81_5abobx2d.bit

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

More
13 Feb 2020 18:32 #157298 by ajsinfotech
Hi PCW

How could I install the 7c81 driver?
I try:

sudo apt-get install hostmot2-firmware-7c81

but it fails:

E: Unable to locate package hostmot2-firmware-7c81

Thanks in advance
Regards,
Alejandro

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

More
13 Feb 2020 18:57 #157303 by ajsinfotech
Hi PCW,

I try this command and I get:

./mesaflash --device 7c81 --addr /dev/spidev0.0 --spi --readhmid

Unexpected cookie at 0100..0110:
00000000 00000000 00000000
No 7C81 board found

What does it mean?

Thanks

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

More
13 Feb 2020 19:47 - 13 Feb 2020 19:50 #157311 by PCW
Replied by PCW on topic Raspberry Pi 4 & MESA 7i92
It means there is a communication issue between the RPI and the 7C81
or the EEPROM data on the 7C81 has been corrupted

Does the 7C81 load its firmware properly on startup? (no red lights left on after power up)

What is the cable length between the RPI and the 7C81 (it should be no longer than 2")

If longer that a few inches, you will not have reliable operation and what's
worse, if you attempt to write firmware to the card you are likely to corrupt the
EEPROM data, requiring re-initialization via JTAG

The driver for the 7C81 is hm2_rpspi (inlcuded with Linuxcnc)
Last edit: 13 Feb 2020 19:50 by PCW.

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

More
13 Feb 2020 20:45 - 13 Feb 2020 20:57 #157319 by ajsinfotech
Thanks PCW!

It means there is a communication issue between the RPI and the 7C81
or the EEPROM data on the 7C81 has been corrupted

I was trying to start linuxcnc with a bad configuration I think. Reboot my RPi3 and problem solved.

Does the 7C81 load its firmware properly on startup? (no red lights left on after power up)

It is ok

What is the cable length between the RPI and the 7C81 (it should be no longer than 2")

It is longer (like those used on PC motherboards). But it works ok by now. I try to flash a couple of times and no issues were found.
I'll make one shorter soon, I promise.
BTW, no more flash test by now :)

The driver for the 7C81 is hm2_rpspi (inlcuded with Linuxcnc)

Ok, driver loaded

But when I try to start linuxcnc I get this error:

Machine configuration directory is '/home/pi/linuxcnc/configs/gmoccapy-rpi3-mesa-mill-v1.0.1'
Machine configuration file is 'gmoccapy-rpi3-mesa-mill-v1.0.1.ini'
Starting LinuxCNC...
Found file(REL): ./gmoccapy-rpi3-mesa-mill-v1.0.1.hal
Note: Using POSIX non-realtime
hm2: loading Mesa HostMot2 driver version 0.15
hm2_rpspi: SPI0/CE0 Invalid cookie, read: 2ad5e5ff 2a292724 192a2726, expected: 55aacafe 54534f48 32544f4d
hm2_rpspi: SPI0/CE0 MISO input is bit-shifted by one bit. SPI read clock frequency probably too high.
hm2_rpspi: rtapi_app_main: No such device (-19)
./gmoccapy-rpi3-mesa-mill-v1.0.1.hal:30: waitpid failed /home/pi/linuxcnc/bin/rtapi_app hm2_rpspi

./gmoccapy-rpi3-mesa-mill-v1.0.1.hal:30: /home/pi/linuxcnc/bin/rtapi_app exited without becoming ready
./gmoccapy-rpi3-mesa-mill-v1.0.1.hal:30: insmod for hm2_rpspi failed, returned -1
Shutting down and cleaning up LinuxCNC...
hm2_rpspi: not loaded
<commandline>:0: exit value: 255
<commandline>:0: rmmod failed, returned -1
hm2: unloading
<commandline>:0: unloadrt failed

Any idea on how to test or set the spi speed clock?

Thanks!
Last edit: 13 Feb 2020 20:57 by ajsinfotech.

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

Time to create page: 0.110 seconds
Powered by Kunena Forum