Mesa 7i90 in SPI mode
- kaklik
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
10 Mar 2016 09:49 - 10 Mar 2016 10:03 #71321
by kaklik
Mesa 7i90 in SPI mode was created by kaklik
Hello,
I have Mesa 7i90HD card and I want to connect it to ODROID-C1 computer running LinuxCNC. The ODROID-C1 has 3,3V compatible l/O, therefore I connected the 7i90HD card directly on ODROID's SPI interface without voltage translator.
I supposed it must working instantly, because it is almost exactly same system as there: github.com/jepler/u3-7i90/blob/master/eagle/oddspi-sch.pdf
But I have problem with SPI communication with Mesa card, the card does not response to input SPI data. If I load the hm2_spi driver by these commands:
loadrt hostmot2
loadrt hm2_spi spidev_path="/dev/spidev0.0" spidev_rate=500
I got the invalid cookie error, which is obviously related to the fact that mesa card does not respond anything on input data. How can I make the mesa card talking on SPI. Do I need to switch a communication mode on a new card by some procedure?
I attach several oscilloscope images:
Blue line shows data from odroid (Connected to PIN 13 of MESA P4 connector) and yellow line is SPICLK signal at PIN11 of P4 connector.
Here blue line is a SPIOUT at PIN 15 and yellow line SPICLK again.
Here is overall look at the test setup:
I have Mesa 7i90HD card and I want to connect it to ODROID-C1 computer running LinuxCNC. The ODROID-C1 has 3,3V compatible l/O, therefore I connected the 7i90HD card directly on ODROID's SPI interface without voltage translator.
I supposed it must working instantly, because it is almost exactly same system as there: github.com/jepler/u3-7i90/blob/master/eagle/oddspi-sch.pdf
But I have problem with SPI communication with Mesa card, the card does not response to input SPI data. If I load the hm2_spi driver by these commands:
loadrt hostmot2
loadrt hm2_spi spidev_path="/dev/spidev0.0" spidev_rate=500
I got the invalid cookie error, which is obviously related to the fact that mesa card does not respond anything on input data. How can I make the mesa card talking on SPI. Do I need to switch a communication mode on a new card by some procedure?
Note: Using POSIX non-realtime
hm2: loading Mesa HostMot2 driver version 0.15
probing device /dev/spidev0.0 with rate 500000 Hz
Invalid cookie
Read: ffffffff ffffffff ffffffff ffffffff
hm2_spi: rtapi_app_main: No such device (-19)
mesa_test.hal:2: waitpid failed /home/odroid/repos/linuxcnc-MLAB/bin/rtapi_app hm2_spi
mesa_test.hal:2: /home/odroid/repos/linuxcnc-MLAB/bin/rtapi_app exited without becoming ready
mesa_test.hal:2: insmod for hm2_spi failed, returned -1
I attach several oscilloscope images:
Blue line shows data from odroid (Connected to PIN 13 of MESA P4 connector) and yellow line is SPICLK signal at PIN11 of P4 connector.
Here blue line is a SPIOUT at PIN 15 and yellow line SPICLK again.
Here is overall look at the test setup:
Last edit: 10 Mar 2016 10:03 by kaklik.
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17870
- Thank you received: 4776
10 Mar 2016 11:34 - 10 Mar 2016 11:39 #71324
by PCW
Replied by PCW on topic Mesa 7i90 in SPI mode
Do you have a bitfile with a SPI host interface loaded in the FPGA?
Also you are very likely to suffer from signal integrity issues unless you use a flat cable
from the 7I90s host interface connector and terminate _all_ the ground pins in that cable
at the ODROID
Also you are very likely to suffer from signal integrity issues unless you use a flat cable
from the 7I90s host interface connector and terminate _all_ the ground pins in that cable
at the ODROID
Last edit: 10 Mar 2016 11:39 by PCW.
Please Log in or Create an account to join the conversation.
- kaklik
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
10 Mar 2016 13:19 #71328
by kaklik
Presumably no. I am using a bitfile shipped in the card's EEPROM memory.. I have read the manual www.mesanet.com/pdf/parallel/7i90hdman.pdf and I do not know what bitfile is flashed in to the new board..
Should I use mesaflash to load some another bitfile in to the 7I90 board? It seems I should obtain a RS-422 adapter or a computer with LPT interface which I could connect to mesa's LBP16/EPP interface...
Yes, I have this in mind, I verified the signal integrity by oscilloscope and it seems to be adequate for current configured speed. I will modify the test setup for higher SPI speeds after I get some data from the mesa board.
Replied by kaklik on topic Mesa 7i90 in SPI mode
Do you have a bitfile with a SPI host interface loaded in the FPGA?
Presumably no. I am using a bitfile shipped in the card's EEPROM memory.. I have read the manual www.mesanet.com/pdf/parallel/7i90hdman.pdf and I do not know what bitfile is flashed in to the new board..
Should I use mesaflash to load some another bitfile in to the 7I90 board? It seems I should obtain a RS-422 adapter or a computer with LPT interface which I could connect to mesa's LBP16/EPP interface...
Also you are very likely to suffer from signal integrity issues unless you use a flat cable
from the 7I90s host interface connector and terminate _all_ the ground pins in that cable
at the ODROID
Yes, I have this in mind, I verified the signal integrity by oscilloscope and it seems to be adequate for current configured speed. I will modify the test setup for higher SPI speeds after I get some data from the mesa board.
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17870
- Thank you received: 4776
10 Mar 2016 15:38 #71342
by PCW
Replied by PCW on topic Mesa 7i90 in SPI mode
7I90s are shipped with EPP configurations in both EEPROMS,
You would need to flash a card with a SPI configuration to test SPI operation
Note that as far as I know, only EPP is know to work with mesaflash,
so make sure you leave a EPP configuration on one EEPROM
You would need to flash a card with a SPI configuration to test SPI operation
Note that as far as I know, only EPP is know to work with mesaflash,
so make sure you leave a EPP configuration on one EEPROM
The following user(s) said Thank You: kaklik
Please Log in or Create an account to join the conversation.
- jepler
- Offline
- Administrator
Less
More
- Posts: 74
- Thank you received: 39
10 Mar 2016 15:50 #71344
by jepler
Replied by jepler on topic Mesa 7i90 in SPI mode
In 2014 I contributed spi support to mesaflash. At least at the time, it did work, I reported in the commit message that it successfully programs and verifies my 7i90 on SPI. But of course you can't use this for initial programming, when the board is shipped with an EPP firmware.
Within the last 6 months I have used odroid u3 + 7i90 over spi to move a motor, so I think the code in linuxcnc is still working properly.
Within the last 6 months I have used odroid u3 + 7i90 over spi to move a motor, so I think the code in linuxcnc is still working properly.
The following user(s) said Thank You: kaklik
Please Log in or Create an account to join the conversation.
- kaklik
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
10 Mar 2016 16:38 #71345
by kaklik
Replied by kaklik on topic Mesa 7i90 in SPI mode
Ok, I will try to upload a SPI based configuration to the FPGA. I downloaded the software support package: www.mesanet.com/software/parallel/7i90.zip , but there are many bitfiles which have 'spi' keyword in name..
Have you some recommended one? (for future programming through SPI )
I thinking about possibility of programming a SPI configuration bitfile through JTAG interface, because using of EPP interface with LPT port is little strange for me. I bought the 7I90HD because I do not want to revive any computer with LPT port.. Therefore, If I could use JTAG interface, as is described here for Xilinx: wiki.mlab.cz/doku.php?id=en:XVC_FT220X I will be happy.
7i90_spi_24xqctronly.bit
7i90_spi_2x7i65.bit
7i90_spi_da2.bit
7i90_spi_justio.bit
7i90_spi_sssv6_36.bit
7i90_spi_sssvst8_1_5_7i47.bit
7i90_spi_sssvst8_8_8.bit
7i90_spi_st12.bit
7i90_spi_st18.bit
7i90_spi_st8_plasma.bit
7i90_spi_sv12.bit
7i90_spi_sv12im_2x7i48.bit
7i90_spi_sv4_7i47s.bit
7i90_spi_sv6_7i49.bit
7i90_spi_svsp8_6_7i46.bit
7i90_spi_svss6_6.bit
7i90_spi_svss6_8.bit
7i90_spi_svss8_44.bit
7i90_spi_svss8_8.bit
7i90_spi_svst1_4_7i47s.bit
7i90_spi_svst1_4_7i47sd.bit
7i90_spi_svst1_5_7i47.bit
7i90_spi_svst2_4_7i47.bit
7i90_spi_svst2_4_7i47d.bit
7i90_spi_svst4_8_ado.bit
7i90_spi_svst4_8.bit
7i90_spi_svst6_6_7i52s.bit
7i90_spi_svst6_6_7i52sd.bit
7i90_spi_svst8_12_2x7i47.bit
7i90_spi_svst8_4.bit
7i90_spi_svst8_4im2.bit
7i90_spi_svst8_8im2.bit
7i90_spi_svsttp6_6_7i39.bit
7i90_spi_svstua6_6_6_7i48.bit
7i90_spi_svua8_4.bit
7i90_spi_svua8_8.bit
Have you some recommended one? (for future programming through SPI )
I thinking about possibility of programming a SPI configuration bitfile through JTAG interface, because using of EPP interface with LPT port is little strange for me. I bought the 7I90HD because I do not want to revive any computer with LPT port.. Therefore, If I could use JTAG interface, as is described here for Xilinx: wiki.mlab.cz/doku.php?id=en:XVC_FT220X I will be happy.
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17870
- Thank you received: 4776
10 Mar 2016 17:33 - 10 Mar 2016 17:34 #71347
by PCW
Replied by PCW on topic Mesa 7i90 in SPI mode
Any bitfile should work for boostrapping
Suggested programming method:
write SPI config to FPGA via JTAG (NOT to flash)
use mesaflash to write fallback SPI config to flash
use mesaflash to write user config to flash
Suggested programming method:
write SPI config to FPGA via JTAG (NOT to flash)
use mesaflash to write fallback SPI config to flash
use mesaflash to write user config to flash
Last edit: 10 Mar 2016 17:34 by PCW.
Please Log in or Create an account to join the conversation.
- kaklik
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
21 Mar 2016 10:39 #71980
by kaklik
Replied by kaklik on topic Mesa 7i90 in SPI mode
OK, I have the first success with mesa 7i90. I loaded the 7i90_spi_justio.bit bitfile to the FPGA trough
XVC
. Then I tried to initialize linuxcnc hostmot2 driver.
But I got the Invalid cookie error again although 7i90 card respond by some data on SPIOUT as is shown in following figure:
Note: Using POSIX non-realtime
hm2: loading Mesa HostMot2 driver version 0.15
probing device /dev/spidev0.0 with rate 500000 Hz
Invalid cookie
Read: 00000000 00000000 00000000 00000000
hm2_spi: rtapi_app_main: No such device (-19)
mesa_test.hal:2: waitpid failed /home/odroid/repos/linuxcnc-MLAB/bin/rtapi_app hm2_spi
mesa_test.hal:2: /home/odroid/repos/linuxcnc-MLAB/bin/rtapi_app exited without becoming ready
mesa_test.hal:2: insmod for hm2_spi failed, returned -1
halcmd:
But I got the Invalid cookie error again although 7i90 card respond by some data on SPIOUT as is shown in following figure:
Please Log in or Create an account to join the conversation.
- kaklik
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
21 Mar 2016 16:23 #71989
by kaklik
Replied by kaklik on topic Mesa 7i90 in SPI mode
I tried to use mesaflash utility by running this command:
./mesaflash --device 7I90 --spi --addr /dev/spidev0.0 --fallback --write ../7i90/configs/fallback/7i90_spi_fallback.bit
Unexpected cookie at 0000..000c:
00000000 00000000 00000000
No 7I90 board found
But the result is almost the same as in case of hostmot2 driver initialization. The oscilloscope image is exactly the same.
What is correct "cookie" which I should get from the board?
./mesaflash --device 7I90 --spi --addr /dev/spidev0.0 --fallback --write ../7i90/configs/fallback/7i90_spi_fallback.bit
Unexpected cookie at 0000..000c:
00000000 00000000 00000000
No 7I90 board found
But the result is almost the same as in case of hostmot2 driver initialization. The oscilloscope image is exactly the same.
What is correct "cookie" which I should get from the board?
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17870
- Thank you received: 4776
21 Mar 2016 16:43 - 21 Mar 2016 17:00 #71991
by PCW
Replied by PCW on topic Mesa 7i90 in SPI mode
The low level register information is documented the the regmap file included in the vhdl source zipfile
Unexpected cookie at 0000..000c: is odd also but maybe OK (the cookie is at 0x0100)
Its possible you have a polarity or SI issue if the SPI interface cannot read the cookie correctly
Note, SI issues on the SPI clock are not really clock speed dependent (they are edge rate dependent)
so running at a low clock speed will not help. Any significant ringing or ground bumping will cause trouble
Unexpected cookie at 0000..000c: is odd also but maybe OK (the cookie is at 0x0100)
Its possible you have a polarity or SI issue if the SPI interface cannot read the cookie correctly
Note, SI issues on the SPI clock are not really clock speed dependent (they are edge rate dependent)
so running at a low clock speed will not help. Any significant ringing or ground bumping will cause trouble
Last edit: 21 Mar 2016 17:00 by PCW.
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.162 seconds