You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/emc/usr_intf/pncconf/ADDING_A_MESA_CARD.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This document describes how to add a new Mesa card to the pncconf utility.
4
4
# Concepts
5
5
There are various types of Mesa cards that this configuration utility supports. Generally speaking, they need to be run with a specific firmware that configures the FPGA on the card to behave in a certain way with respect to the I/O of the card. In some cases this firmware is installed at runtime by LinuxCNC and in other cases it is loaded on the boards manually via some other process. In order for pncconf to be able to properly generate a configuration, it must know both the Mesa I/O card(s) you are configuring, as well as the firmware installed on those cards. In the case of the real time drivers (for example the `hm2_pci` driver), the pinout from message will be written to the `dmesg` facility on LinuxCNC startup. In the case of the upsace drivers (for example the `hm2_eth` driver), the pinouts are written to the `stdout` of the LinuxCNC process and so you can see the pinout by starting LinuxCNC from a command prompt.
6
6
7
-
Individual firmware images allow additional configuration, via the driver, to specify for instance the specific number of stepgens, pwmgens and encoders your specific machine requires. The remaining I/O is typically configured as GPIO. For example, a `7i93` card, can be configiured with an `SVST4_4d` firmware, which allows up to 4 steppers, 4 encoders, and 4 pwmgens. Using pncconf you can configure fewer of each of those, and the remainder will be configured as GPIO. Because things like stepgens, pwmgens, and encoders are allocated in the firmware in a particular order, typically you have to align the wiring of the machine to respect these limitations. This is a limitation of how the Mesa firmware is handled, not pncconf.
7
+
Individual firmware images allow additional configuration, via the driver, to specify for instance the specific number of stepgens, pwmgens and encoders your specific machine requires. The remaining I/O is typically configured as GPIO. For example, a `7i93` card, can be configured with an `SVST4_4d` firmware, which allows up to 4 steppers, 4 encoders, and 4 pwmgens. Using pncconf you can configure fewer of each of those, and the remainder will be configured as GPIO. Because things like stepgens, pwmgens, and encoders are allocated in the firmware in a particular order, typically you have to align the wiring of the machine to respect these limitations. This is a limitation of how the Mesa firmware is handled, not pncconf.
8
8
9
9
To add a board to pncconf, you must create a list data structure within the `private_data.py``MESA_INTERNAL_FIRMWAREDATA` list variable that specifies the details of the card. There will be an entry in that data structure for each combination of card and firmware that you wish to have as configuration options.
10
10
@@ -42,7 +42,7 @@ The expected data elements of the list are described programmatically in the `pr
42
42
43
43
The remainder of the data structure consists of list entries specifying the individual I/O pins of the card in order of how they will be allocated by the firmware. For instance the first six pins are used to provision two encoders with a,b and index connections: `[S.ENCB,1],[S.ENCA,1],[S.ENCB,0],[S.ENCA,0],[S.ENCI,1],[S.ENCI,0]`. The next two pins are two pwmgens: `[S.PWMP,1],[S.PWMP,0]`. The order of these pins is not arbitrary, and must match what the specific firmware on the card is expecting. This information is supplied from Mesa in the form of pin files, typically shipped with the firmware files. In our case there are 48 entries because there are 48 I/O pins.
44
44
45
-
Allocation of the order of I/O pins to connectors is done at the Mesa hardware level and in our case the Mesa manual for the `7i93` specifies `CONECTOR P2 I/O 0..23` and `CONNECTOR P1 I/O 24..47`.
45
+
Allocation of the order of I/O pins to connectors is done at the Mesa hardware level and in our case the Mesa manual for the `7i93` specifies `CONNECTOR P2 I/O 0..23` and `CONNECTOR P1 I/O 24..47`.
46
46
47
47
If logical number < 100 => GPIO can be changed to GPIOO or GPIOD at the start of linuxcnc, load time if you prefer (or run time)
48
48
If logical number > 100 => GPIO can NOT be changed to GPIOO or GPIOD at the start of linuxcnc, load time (always input or always output)
0 commit comments