| 1 | [[PageOutline]] |
| 2 | = GW16160 - Precision GNSS M.2 Card |
| 3 | |
| 4 | The GW16160 is a precision GNSS M.2 Card featuring the Septentrio mosaic-X5 multi-frequency receiver. |
| 5 | |
| 6 | Read 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 |
| 10 | The 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 | |
| 22 | The 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 | |
| 24 | M.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 |
| 49 | The 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 |
| 54 | The Mosiac-X5 NRST_IN# needs to be floating (internal pu) or driven high at 3.3V to allow the card out of reset. |
| 55 | |
| 56 | On the GW160160 U7 is a voltage translator to translate the SDIO_RESET# from 1.8V to 3.3V. |
| 57 | |
| 58 | Examples: |
| 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 |
| 62 | gpio set gpio2_10 |
| 63 | }}} |
| 64 | - via Linux (gpio2_10 is gpio-42) |
| 65 | {{{#!bash |
| 66 | echo 42 > /sys/class/gpio/export |
| 67 | echo out > /sys/class/gpio/gpio42/direction |
| 68 | echo 0 > /sys/class/gpio/gpio42/value # drive low to reset |
| 69 | echo 1 > /sys/class/gpio/gpio42/value # release reset |
| 70 | }}} |
| 71 | |
| 72 | Reset 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 |
| 78 | When powered and out of reset, the Mosiac-X5 USB interface enumerates on the USB bus with a VID/PID of 0x152a:0x85c0: |
| 79 | {{{#!bash |
| 80 | Bus 003 Device 004: ID 152a:85c0 Thesycon Systemsoftware & Consulting GmbH Septentrio USB Device |
| 81 | }}} |
| 82 | |
| 83 | The 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 | |
| 89 | A 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 |
| 98 | 9: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 |
| 118 | The 2x USB ACM interfaces are represented by USB1 and USB2 Connection Descriptors (CD) and would typically enumerate as /dev/ttyACM0 and /dev/ttyACM1. |
| 119 | |
| 120 | Examples: |
| 121 | {{{#!bash |
| 122 | screen /dev/ttyACM0 # USB1 |
| 123 | screen /dev/ttyACM1 # USB2 |
| 124 | }}} |
| 125 | |
| 126 | |
| 127 | === RNDIS Ethernet device |
| 128 | The 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 | |
| 130 | To utilize this you can put the interface in a bridge with your primary network device. |
| 131 | |
| 132 | Example: |
| 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 |
| 136 | allow-hotplug eth0 |
| 137 | auto br0 |
| 138 | iface 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 |
| 146 | brctl addbr br0 |
| 147 | brctl addif br0 eth0 |
| 148 | brctl addif br0 eth1 |
| 149 | udhcpc br0 |
| 150 | }}} |
| 151 | |
| 152 | After 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 |
| 157 | The USB Mass storage interface allows access to the SD interface on the Mosaic-X5. |
| 158 | |
| 159 | By 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 |
| 162 | The SD interface on the Mosaic-X5 is a 1-bit SDIO device which goes to a MicroSD socket on the GW16160. |
| 163 | |
| 164 | Receiver config examples: |
| 165 | * use the 'LstDiskInfo,DSK1' receiver command to obtain info about it: |
| 166 | {{{#!bash |
| 167 | LstDiskInfo,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 |
| 182 | exeManageDisk, DSK1, Format |
| 183 | }}} |
| 184 | * Log NMEA GPS GGA 1Hz to it |
| 185 | {{{#!bash |
| 186 | setNMEAOutput, Stream1, DSK1 |
| 187 | setNMEAOutput, Stream1, , GGA |
| 188 | setNMEAOutput, Stream1, , , sec1 |
| 189 | }}} |
| 190 | |
| 191 | |
| 192 | == UART Interface |
| 193 | The 2-wire UART on the GW16160 is routed to COM1 on the Mosaic-X5. |
| 194 | |
| 195 | By default COM1 is configured for 115200bd 8N1 no flow control. You can use 'getCOMSettings' and 'setCOMSettings' to configure this. |
| 196 | |
| 197 | With a GW16160 mounted on a GW8201 with a GW16FE0 in FSA2 this is /dev/ttymxc2: |
| 198 | {{{#bash |
| 199 | screen /dev/ttymxc2 115200,cs8 # UART3 (FSA#2) |
| 200 | }}} |
| 201 | |
| 202 | == Ethernet Interface |
| 203 | The 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 | |
| 209 | By 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 | |
| 211 | If connected to a link partner this provides a 100Mbps interface (which you may need to force via ethtool) |
| 212 | |
| 213 | The '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 | |
| 215 | The '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 | |
| 217 | If using DHCP you can obtain the IPParameters from the receiver via 'lstInternalFile,IPParameters': |
| 218 | {{{#!bash |
| 219 | lstInternalFile,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 | |
| 234 | In 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 |
| 242 | The 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 | |
| 248 | The GPLED and GPLED2 can be configured for varios modes |
| 249 | |
| 250 | Receiver commands: |
| 251 | {{{#!bash |
| 252 | getLEDMode # show LED mode for GPLED and GPLED2 |
| 253 | setLEDMode,$GPLED,$GPLED2 # DIFFCORLED, PVTLED, TRACKLED, LOGLED, RTKLED: |
| 254 | }}} |
| 255 | |
| 256 | == PPS Output |
| 257 | The PPS output on M.2 pin 34 is highly configurable. The default configuration is to output 1Hz Low2High synchronized with GPS |
| 258 | |
| 259 | When 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 | |
| 261 | You 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 | |
| 281 | Changing the current pps in the gw82xx to this would look like this (although note you can have multiple pps sources): |
| 282 | {{{#!bash |
| 283 | diff --git a/arch/arm64/boot/dts/freescale/imx8mp-venice-gw82xx.dtsi b/arch/arm64/boot/dts/freescale/imx8mp |
| 284 | -venice-gw82xx.dtsi | |
| 285 | index 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 | |
| 307 | To configure PPS via the receiver: |
| 308 | {{{#!bash |
| 309 | getPPSParameters # default is sec1, Low2High, 0.00, GPS, 60, 5.000000 |
| 310 | setPPSParameters,sec1,,,UTC # sync with UTC 1Hz |
| 311 | }}} |
| 312 | |
| 313 | == EventA Input |
| 314 | The EVENTA input signal on the Moasic-X5 routed to M2 pin 36 on the GW16160 and can be configured to trigger various things |
| 315 | |
| 316 | When 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 | |
| 318 | To configure this via the receiver: |
| 319 | {{{#!bash |
| 320 | setEventParameters,+EventB,Low2High,0.0 # set polarity/delay for eventb |
| 321 | setSBFOutput,Stream1,COM1,ExtEvent,OnChange |
| 322 | }}} |
| 323 | |
| 324 | The integrated web admin will display events as they come in as well |
| 325 | |
| 326 | == Receiver |
| 327 | The 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 | |
| 333 | The Mosaic-X5 Firmware Reference Guide (available [https://www.septentrio.com/en/products/gnss-receivers/gnss-receiver-modules/mosaic-x5 here]) destails the capabilities. |
| 334 | |
| 335 | You can access the receiver commands in various ways: |
| 336 | * via web admin |
| 337 | * via USB1/USB2: |
| 338 | {{{#!bash |
| 339 | screen /dev/ttyACM0 # USB1 |
| 340 | screen /dev/ttyACM1 # USB2 |
| 341 | }}} |
| 342 | * via COM1: |
| 343 | {{{#!bash |
| 344 | screen /dev/ttymxc2 115200,cs8 # GW820x+GW16FE0 FSA2 (UART3) |
| 345 | }}} |
| 346 | |
| 347 | Configuration: |
| 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 | |
| 357 | a few examples: |
| 358 | {{{#!bash |
| 359 | # show help |
| 360 | help |
| 361 | # show COM1 settings |
| 362 | getCOMSettings |
| 363 | # configure COM1 baudrate |
| 364 | setCOMSettings,COM1,baud115200,bits8,No,bit1,none |
| 365 | # log NMEA GGA 1Hz to com1 |
| 366 | setNMEAOutput, Stream1,COM1,GGA,sec1 |
| 367 | # log NMEA GGA 1Hz to log.nma |
| 368 | setNMEAOutput, Stream1,DSK1,GGA,sec1 |
| 369 | # configure both LEDs for LOGLED |
| 370 | setLEDMode, LOGLED, LOGLED |
| 371 | # show differences from factory default for current config |
| 372 | lstConfigFlie, Current |
| 373 | # restore factory defaults |
| 374 | exeCopyConfigFile,RxDefault,Boot |
| 375 | }}} |