Changes between Initial Version and Version 1 of expansion/gw16160


Ignore:
Timestamp:
08/11/2025 05:01:11 PM (7 hours ago)
Author:
Ryan Erbstoesser
Comment:

start page

Legend:

Unmodified
Added
Removed
Modified
  • expansion/gw16160

    v1 v1  
     1[[PageOutline]]
     2= GW16160 - Precision GNSS M.2 Card
     3
     4The GW16160 is a precision GNSS M.2 Card featuring the Septentrio mosaic-X5 multi-frequency receiver.
     5
     6Read more on the official product page here: [https://www.gateworks.com/products/wireless-options/gw16160-septentrio-mosaic-precision-gnss-m2-card/]
     7
     8
     9== Features
     10The GW16160 features a [https://www.septentrio.com/en/products/gnss-receivers/gnss-receiver-modules/mosaic-x5 Septentrio Mosaic-X5 Precision GNSS receiver] on an M.2 A/E Key card with:
     11 - 2-wire UART (COM1)
     12 - USB 2.0 (USB1, USB2, RNDIS, USB Mass Storage)
     13 - RESET#
     14 - PPS_OUT
     15 - EVENTA_IN
     16 - 100Mbps Ethernet interface
     17 - 4 LEDs: Power, GPLED, GPLED2, LOGLED
     18 - microSD socket (for logging)
     19
     20== M.2 Pinout
     21
     22The following tables provide the connector pinouts for the 10-pin debug header and the M.2 A/E-Key connector. Optional signals for the Gateworks adapter are highlighted in yellow. All are mapped to no connect or reserved pins on the M.2 connector. All of these optional signals can be bypassed to allow support with different baseboards. Contact sales for optional special configurations.
     23
     24M.2 Pinout:
     25 - M2.23 RST#(1.8V); must be driven high to take Mosaic-X5 out of reset
     26 - M2.2 VDD_BAT
     27 - M2.3 USB_DP
     28 - M2.5 USB_DM
     29 - M2.22 UART_TXD (1.8V) output from card
     30 - M2.32 UART_RXD (1.8V) input to card
     31 - M2.34 PPS (1.8V) output from card; normally UART_RTS; via R23 (loaded)
     32 - M2.36 EVENTA (1.8V) input to card; normally UART_CTS; via R24 (loaded)
     33 - M2.4,72,74 VDD_3P3
     34 - M2.1,7,33,39,45,51,57,63,69,75 GND
     35 - M2.59 ENET_TX+; normally RSVD
     36 - M2.61 ENET_TX-; normally RSVD
     37 - M2.71 ENET_RX+; normally RSVD
     38 - M2.73 ENET_RX-; normally RSVD
     39 - M2.67 EVENTB(1.8V); normally RSVD; via R22 (unloaded)
     40
     41[[Image(16160pinout.jpg,800px)]]
     42* UART TXD1 = UART output from GPS
     43* UART RXD1 = UART input to GPS
     44* VCC3_BAT = Dedicated battery backup pin, if battery backup is not needed, connect to VCC3
     45
     46[[Image(16160debug.jpg)]]
     47
     48== Compatibility
     49The only A-Key sockets on Gateworks boards are:
     50 - GW16151 MiniPCIe to M.2 E-Key Adapter - does not connect pin 23 (won't bring Mosaic out of reset)
     51 - GW820x+GW16FE0 in FSA2 - SDIO_RESET# is pin23 and is GPIO2_10. To take out of reset you can add 'gpio set gpio2_10' to U-Boot scripts (ie preboot). FSA1 does not connect pin23
     52
     53== Reset
     54The Mosiac-X5 NRST_IN# needs to be floating (internal pu) or driven high at 3.3V to allow the card out of reset.
     55
     56On the GW160160 U7 is a voltage translator to translate the SDIO_RESET# from 1.8V to 3.3V.
     57
     58Examples:
     59 * take out of reset when mounted on a GW16FE0 in FSA2 of a GW820x where SDIO_RESET# is GPIO2_10:
     60  - via U-Boot
     61{{{#!bash
     62gpio set gpio2_10
     63}}}
     64  - via Linux (gpio2_10 is gpio-42)
     65{{{#!bash
     66echo 42 > /sys/class/gpio/export
     67echo out > /sys/class/gpio/gpio42/direction
     68echo 0 > /sys/class/gpio/gpio42/value # drive low to reset
     69echo 1 > /sys/class/gpio/gpio42/value # release reset
     70}}}
     71
     72Reset Loading Options:
     73 - resistor R20 can be loaded and U7 unloaded to directly connect these if used in a socket where this pin is 3.3V
     74 - U7 can be unloaded and the internal PU will allow the Mosiac out of reset without the ability to reset it via hardware
     75
     76
     77== USB Interface
     78When powered and out of reset, the Mosiac-X5 USB interface enumerates on the USB bus with a VID/PID of 0x152a:0x85c0:
     79{{{#!bash
     80Bus 003 Device 004: ID 152a:85c0 Thesycon Systemsoftware & Consulting GmbH Septentrio USB Device
     81}}}
     82
     83The USB device provides 7 endpoints:
     84 - {0,1} - RNDIS Ethernet device (Linux rndis_host driver)
     85 - {2,3} - CDC ACM device (Linux cdc_acm driver)
     86 - {4,5} - CDC ACM device (Linux cdc_acm driver)
     87 - 6 - USB Mass Storage device (Linux usb-storage driver)
     88
     89A Linux kernel would show:
     90{{{#!bash
     91[  213.543608] usb 3-1.2: new high-speed USB device number 5 using xhci-hcd
     92[  213.653262] usb 3-1.2: New USB device found, idVendor=152a, idProduct=85c0, bcdDevice= 3.14
     93[  213.661651] usb 3-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
     94[  213.668987] usb 3-1.2: Product: Septentrio USB Device
     95[  213.674075] usb 3-1.2: Manufacturer: Septentrio
     96[  213.678628] usb 3-1.2: SerialNumber: 3838051
     97[  213.799064] rndis_host 3-1.2:1.0 eth0: register 'rndis_host' at usb-xhci-hcd.1.auto-1.2, RNDIS device, 1a:32:02:9
     989:15:45
     99[  213.814494] cdc_acm 3-1.2:1.2: ttyACM0: USB ACM device
     100[  213.822420] cdc_acm 3-1.2:1.4: ttyACM1: USB ACM device
     101[  213.828650] usb-storage 3-1.2:1.6: USB Mass Storage device detected
     102[  213.835529] scsi host0: usb-storage 3-1.2:1.6
     103[  213.864384] rndis_host 3-1.2:1.0 enx1a3202991545: renamed from eth0
     104[  214.868534] scsi 0:0:0:0: CD-ROM            Linux    File-CD Gadget   0314 PQ: 0 ANSI: 2
     105[  214.877127] scsi 0:0:0:1: Direct-Access     Linux    File-CD Gadget   0314 PQ: 0 ANSI: 2
     106[  214.886483] sr 0:0:0:0: Power-on or device reset occurred
     107[  214.893005] sr 0:0:0:0: [sr0] scsi-1 drive
     108[  214.903049] sr 0:0:0:0: Attached scsi CD-ROM sr0
     109[  214.908064] sr 0:0:0:0: Attached scsi generic sg0 type 5
     110[  214.914321] sd 0:0:0:1: Attached scsi generic sg1 type 0
     111[  214.914851] sd 0:0:0:1: Power-on or device reset occurred
     112[  214.926006] sd 0:0:0:1: [sda] Media removed, stopped polling
     113[  214.932590] sd 0:0:0:1: [sda] Attached SCSI removable disk
     114}}}
     115
     116
     117=== USB ACM interfaces
     118The 2x USB ACM interfaces are represented by USB1 and USB2 Connection Descriptors (CD) and would typically enumerate as /dev/ttyACM0 and /dev/ttyACM1.
     119
     120Examples:
     121{{{#!bash
     122screen /dev/ttyACM0 # USB1
     123screen /dev/ttyACM1 # USB2
     124}}}
     125
     126
     127=== RNDIS Ethernet device
     128The RNDIS Ethernet interface (not to be confused with the RMII Ethernet) provides a built-in web-server on port 80 on a fixed IP of 192.168.3.1
     129
     130To utilize this you can put the interface in a bridge with your primary network device.
     131
     132Example:
     133 * GW8201 where eth0 is your LAN connection, eth1 is the PCI GbE, eth2 would be the Mosaic-X5 RNDIS interface you can put eth0 and eth2 in a bridge
     134  - with the following /etc/network/interface:
     135{{{#!bash
     136allow-hotplug eth0
     137auto br0
     138iface br0 inet dhcp
     139    bridge_ports eth0 eth2
     140    bridge_stp off
     141    bridge_fd 0
     142    bridge_maxwait 0
     143}}}
     144  - manually:
     145{{{#!bash
     146brctl addbr br0
     147brctl addif br0 eth0
     148brctl addif br0 eth1
     149udhcpc br0
     150}}}
     151
     152After bringing up the bridge and the bridge getting a network address give your host computer an IP on the 192.168.3/24 network and you can open a URL to 192.168.3.1 to access the web admin.
     153
     154
     155
     156=== USB Mass Storage interface
     157The USB Mass storage interface allows access to the SD interface on the Mosaic-X5.
     158
     159By default the Mosaic-X5 will mount the microSD internally to be used for highly configurable logging represented as the DSK1 connection descriptor (CD). If you unmount this internally it is made available via the USB Mass Storage device.
     160
     161== SD Interface
     162The SD interface on the Mosaic-X5 is a 1-bit SDIO device which goes to a MicroSD socket on the GW16160.
     163
     164Receiver config examples:
     165 * use the 'LstDiskInfo,DSK1' receiver command to obtain info about it:
     166{{{#!bash
     167LstDiskInfo,DSK1
     168---->
     169$-- BLOCK 1 / 0 C
     170<?xml version="1.0" encoding="ISO-8859-1" ?>
     171<DiskInfo version="0.1">
     172
     173---->
     174$-- BLOCK 2 / 0 C
     175  <Disk name="DSK1" total="7931641856" free="7931449344" >
     176    <File name="log.nma" size="131072" />
     177  </Disk>
     178</DiskInfo>
     179}}}
     180 * format it:
     181{{{#!bash
     182exeManageDisk, DSK1, Format
     183}}}
     184 * Log NMEA GPS GGA 1Hz to it
     185{{{#!bash
     186setNMEAOutput, Stream1, DSK1
     187setNMEAOutput, Stream1, , GGA
     188setNMEAOutput, Stream1, , , sec1
     189}}}
     190
     191
     192== UART Interface
     193The 2-wire UART on the GW16160 is routed to COM1 on the Mosaic-X5.
     194
     195By default COM1 is configured for 115200bd 8N1 no flow control. You can use 'getCOMSettings' and 'setCOMSettings' to configure this.
     196
     197With a GW16160 mounted on a GW8201 with a GW16FE0 in FSA2 this is /dev/ttymxc2:
     198{{{#bash
     199screen /dev/ttymxc2 115200,cs8 # UART3 (FSA#2)
     200}}}
     201
     202== Ethernet Interface
     203The Mosaic-X5 Ethernet interface (not to be confused by the USB RNDIS interface) is provided via RMII to an off-module PHY where we route the TX/RX pairs (4-wires) to reserved pins on the M.2 connector:
     204 - M2.59 ENET_TX+
     205 - M2.61 ENET_TX-
     206 - M2.71 ENET_RX+
     207 - M2.73 ENET_RX-
     208
     209By default the Mosaic-X5 expects a 50MHz REF_CLK to be provided by the PHY. The PHY on the GW16160 needs the 50MHz REF_CLK to be provided by the MAC and for this to occur you need to apply a firmware update.
     210
     211If connected to a link partner this provides a 100Mbps interface (which you may need to force via ethtool)
     212
     213The 'EthernetMode' needs to be enabled in the receiver and this (as well as IPSettings) does not appear to be tracked by the receiver configuration (its stored in NVRAM automatically) and persists across power cycles.
     214
     215The 'IPSettings' also need to be configured which default to dhcp with a hostname of mosaic-x5-xxxxxxx (where the last 7 digits are the serial number of the receiver). This is not tracked by receiver configuration (its stored in NVRAM automatically) and persists across power cycles.
     216
     217If using DHCP you can obtain the IPParameters from the receiver via 'lstInternalFile,IPParameters':
     218{{{#!bash
     219lstInternalFile,IPParameters
     220---->
     221$-- BLOCK 1 / 1
     222<?xml version="1.0" encoding="ISO-8859-1" ?>
     223<ipparameters>
     224    <interface name="eth0"  type="Ethernet" hostname="mosaic-x5-3838323">
     225        <hardware addr="8C:1C:DA:52:CE:C5"/>
     226        <inet addr="192.168.3.176" mask="255.255.255.0" gateway="" mode="dhcp"/>
     227        <statistics txbytes="1080" rxbytes="151338" internet="Not Tested"/>
     228    </interface>
     229    <resolv>
     230    </resolv>
     231</ipparameters>
     232}}}
     233
     234In summary you need the following to use this interface:
     235 * Link partner connected to the 2 pairs configured for 100mbps ethernet
     236 * firmware update to provide the 50Mhz clk from the Mosaic MAC
     237 * EthernetMode enabled in the receiver
     238 * either set IPParameters for static IP or read it to get IP settings
     239
     240
     241== LEDs
     242The following LED's are available on the GW16160:
     243 - Power
     244 - GPLED: configurable
     245 - GPLED2: confiugrable
     246 - LOGLED: off when SD card not present, on when SD card present and mounted, short blinks when logging
     247
     248The GPLED and GPLED2 can be configured for varios modes
     249
     250Receiver commands:
     251{{{#!bash
     252getLEDMode # show LED mode for GPLED and GPLED2
     253setLEDMode,$GPLED,$GPLED2 # DIFFCORLED, PVTLED, TRACKLED, LOGLED, RTKLED:
     254}}}
     255
     256== PPS Output
     257The PPS output on M.2 pin 34 is highly configurable. The default configuration is to output 1Hz Low2High synchronized with GPS
     258
     259When the GW16160 is used on a GW8201 with a GW16FE0 in FSA2 pin 34 is UART_RTS which maps to MX8MP_IOMUXC_ECSPI1_SS0__GPIO5_IO09.
     260
     261You can connect this to a pps source via the following dt fragment:
     262{{{#!bash
     263/ {
     264        pps {
     265                compatible = "pps-gpio";
     266                pinctrl-names = "default";
     267                pinctrl-0 = <&pinctrl_pps>;
     268                gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>;
     269        };
     270};
     271
     272&iomuxc {
     273        pinctrl_pps: ppsgrp {
     274                fsl,pins = <
     275                        MX8MP_IOMUXC_ECSPI1_SS0__GPIO5_IO09     0x140
     276                >;
     277        };
     278};
     279}}}
     280
     281Changing the current pps in the gw82xx to this would look like this (although note you can have multiple pps sources):
     282{{{#!bash
     283diff --git a/arch/arm64/boot/dts/freescale/imx8mp-venice-gw82xx.dtsi b/arch/arm64/boot/dts/freescale/imx8mp
     284-venice-gw82xx.dtsi                                                                                        |
     285index 2b86cc62a41a..137d78c3eb4a 100644
     286--- a/arch/arm64/boot/dts/freescale/imx8mp-venice-gw82xx.dtsi
     287+++ b/arch/arm64/boot/dts/freescale/imx8mp-venice-gw82xx.dtsi
     288@@ -45,7 +45,7 @@ pps {
     289                compatible = "pps-gpio";
     290                pinctrl-names = "default";
     291                pinctrl-0 = <&pinctrl_pps>;
     292-               gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
     293+               gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>;
     294        };
     295 
     296        reg_usb2_vbus: regulator-usb2 {
     297@@ -414,7 +415,7 @@ MX8MP_IOMUXC_SAI3_RXC__GPIO4_IO29   0x106   /* PERST# */
     298                                                                                                           |
     299        pinctrl_pps: ppsgrp {
     300                fsl,pins = <
     301-                       MX8MP_IOMUXC_SAI1_RXD1__GPIO4_IO03      0x146
     302+                       MX8MP_IOMUXC_ECSPI1_SS0__GPIO5_IO09     0x146
     303                >;
     304        };
     305}}}
     306
     307To configure PPS via the receiver:
     308{{{#!bash
     309getPPSParameters # default is sec1, Low2High, 0.00, GPS, 60, 5.000000
     310setPPSParameters,sec1,,,UTC # sync with UTC 1Hz
     311}}}
     312
     313== EventA Input
     314The EVENTA input signal on the Moasic-X5 routed to M2 pin 36 on the GW16160 and can be configured to trigger various things
     315
     316When the GW16160 is used on a GW8201 with a GW16FE0 in FSA2 pin 34 is UART_RTS which maps to MX8MP_IOMUXC_ECSPI1_MISO__GPIO5_IO08.
     317
     318To configure this via the receiver:
     319{{{#!bash
     320setEventParameters,+EventB,Low2High,0.0 # set polarity/delay for eventb
     321setSBFOutput,Stream1,COM1,ExtEvent,OnChange
     322}}}
     323
     324The integrated web admin will display events as they come in as well
     325
     326== Receiver
     327The Mosaic-X5 Receiver is highly capable and configurable. It uses Connection Descriptors to refer to its various interfaces:
     328 - COM1 - UART
     329 - USB1 - ttyACM0
     330 - USB2 - ttyACM1
     331 - DSK1 - microSD
     332
     333The Mosaic-X5 Firmware Reference Guide (available [https://www.septentrio.com/en/products/gnss-receivers/gnss-receiver-modules/mosaic-x5 here]) destails the capabilities.
     334
     335You can access the receiver commands in various ways:
     336 * via web admin
     337 * via USB1/USB2:
     338{{{#!bash
     339screen /dev/ttyACM0 # USB1
     340screen /dev/ttyACM1 # USB2
     341}}}
     342 * via COM1:
     343{{{#!bash
     344screen /dev/ttymxc2 115200,cs8 # GW820x+GW16FE0 FSA2 (UART3)
     345}}}
     346
     347Configuration:
     348 - There are multiple sets of configs that you can work with
     349  * Current - current config
     350  * Boot - boot up config
     351  * User1 - user defined 1
     352  * User2 - user defined 2
     353  * RXDefault - factory default, not writable
     354 - use 'lstConfigFile, $CONFIG' to show the differences between a config and RXDefault
     355 - use 'exeCopyConfigFile,$SRC,$TARGET' to copy configs
     356
     357a few examples:
     358{{{#!bash
     359# show help
     360help
     361# show COM1 settings
     362getCOMSettings
     363# configure COM1 baudrate
     364setCOMSettings,COM1,baud115200,bits8,No,bit1,none
     365# log NMEA GGA 1Hz to com1
     366setNMEAOutput, Stream1,COM1,GGA,sec1
     367# log NMEA GGA 1Hz to log.nma
     368setNMEAOutput, Stream1,DSK1,GGA,sec1
     369# configure both LEDs for LOGLED
     370setLEDMode, LOGLED, LOGLED
     371# show differences from factory default for current config
     372lstConfigFlie, Current
     373# restore factory defaults
     374exeCopyConfigFile,RxDefault,Boot
     375}}}