Mesa 5i25t, notes from basic stepper installation

More
22 Apr 2023 16:35 #269614 by dgrover
 
I could not find clear information on the Mesa 5i25t, so here's a brief write up of what seemed to work for me.

For context, our makerspace has a heavily modified IBC Boardmaker 2222, a 22" x 22" PCB engraver.  (Yes, only 22" x 22", but we get by.)  Many parts, including ball screws and a real Z axis, have been upgraded, along with stepper drivers, spindle and spindle drive, etc., so it only looks like a Boardmaker at this point.  We're using G251's.  For about a dozen years we've been running the same version of LinuxCNC/EMC on an Atom motherboard with software step generation.  That motherboard died, and we decided to replace it with a more recent PC, and a Mesa FPGA since we've had good luck with maybe half a dozen other various machines running LinuxCNC and Mesa boards.

Initially I wanted a 5i25, but that's not available--the 5i25t was, though.

From research, emails with Peter Wallace, and experimentation, I believe the following to be true:
--the 5i25t is only supported by the version 2.10 (and up) of LinuxCNC, which is I think only available through the buildbot since this is a development build at the moment (April 2023).  The description of the 5i25t on Mesa's website mentions this at the top.
--the 5i25t uses a different FPGA than the 5i25 (due to chip shortages)
--the 5i25t uses different configuration files than the 5i25
--once programmed, the 5i25t is said to appear to pncconf and LinuxCNC as a 5i25
--program using the mesaflash program.  For example:
sudo ./mesaflash --device 5i25t --write 5i25t_7i76x2d.bin
--the FPGA config files are .bin, and there are no pin files
--the mesaflash program can tell you useful pin information once the FPGA has been flashed.  For example, after either a --reload command in mesaflash, or a reboot:
sudo ./mesaflash --device 5i25t --readhmid

(It is unclear to me what configuration it is initially programmed with, or if it programmed at all.)
 

I started with the Debian Buster PREEMPT-RT ISO live installation, and then followed instructions at buildbot.linuxcnc.org/ to remove all the linuxcnc packages, then to install the buster master-rtpreempt package.

I then had to pick one of the 5 (as of this date) FPGA configuration files that are available on the Mesa website for the 5i25t (specifications tab, download support software):  justio, 5abobx2, 7i76x2d, 7i77x2d, 16m_fallback.  Because there are no pin files to look at as there are for other boards, you can either flash the config and use mesaflash to report on the config, or you can look at the source files also included in that zip file.  For example, PIN_5ABOBx2_34.vhd.  

The PCB engraver needs 3 step/dir pairs, 1 spindle enable (always runs at 10K rpm), and 5 home/limit switches.  Initially the 5abobx2 looked useful, but I didn't see where pncconf knows about it.  I eventually landed on 7i76x2d as having the things I needed (i.e., at least 3 stepper generators) and was also known to pncconf.  If there are modules (quadrature counters, etc.) that you don't need, that's fine--you can disable them in pncconf.

Now for ports and pins.

I do not understand why pncconf shows things the way it does (see below), but pncconf shows you a table of a strange mix of ports and something else when you configure pins for P3, which is routed to the installed DB-25.  You'll need to refer to the .vhd file or mesaflash's report to map i/o ports to the db-25 pins.

Here is mesaflash's report (in part) for the 5i25t_7i76x2d.bin:

...
IO Connections for P3
DB25 pin#             I/O   Pri. func    Sec. func        Chan     Sec. Pin func   Sec. Pin Dir

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

DB-25 pins 18-25 are nominally ground (but some of those pins can be switched via jumpers to +5v I think).

Again, the SSERIAL and QCount (and extra StepGen) can be disabled if not needed, and instead used for general purpose I/O.

Below, pncconf's configuration table for P3, the built-in DB-25.
https://lh3.googleusercontent.com/ydvFGiDiubxTddbxu5d7juH1PgGOYNnznCJkh5x_ZPEtuzJvp6sPHfVPeUtcDsfEkwVMKGxexS2UINKv8abcGwLzGkgxob8RydPlQ1TZ_nIJEzB_pknqn_GEuX90duybKeLXFfXUoAdbfAi6hIeWku4

pncconf seems to show things in order of I/O port, but for many ports/pins, instead shows nothing or a number.  I believe the order, first in the left column top to bottom, then the second column, is the I/O port number order.  You can then map these to DB-25 pins.

(I'm sure it's someplace in the documentation, but for GPIO pins, first select the pin type as input or output, and then you'll get a list of options for function.)


All the other use of pncconf and LinuxCNC is as expected.

Hopefully this can help someone else get their system running faster than I did.  If I've made errors here, I'd appreciate corrections.




 

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

Moderators: cmorley
Time to create page: 0.355 seconds
Powered by Kunena Forum