1.. _mg100:
2
3Laird Connectivity Sentrius™ MG100 Gateway
4##########################################
5
6Overview
7********
8The Sentrius™ MG100 Gateway offers a compact, out of box Bluetooth to low power cellular gateway
9solution.
10
11Based on the Pinnacle 100 socket modem, the Sentrius™ MG100 gateway captures data from any
12Bluetooth 5 modules or devices and sends it to the cloud via a global low power cellular
13(LTE-M/NB-IoT) connection. The MG100 seamlessly incorporates a powerful Cortex M4F controller,
14full Bluetooth 5 connectivity, and dual-mode LTE-M/NB-IoT capabilities. The MG100 has full regulatory
15and network certifications and End Device carrier approvals.
16
17Develop your application directly on the integrated Cortex M4F microcontroller using Zephyr RTOS,
18enabling your application development with a secure, open source RTOS with more than just kernel
19services. Remotely debug your fleet of devices with the `Memfault Platform`_. Take advantage of the
20Zephyr community and Laird Connectivity’s multi featured Out of Box (OOB) sample source code
21covering all aspects of the product's capabilities and hardware interfaces. The MG100 also delivers
22complete antenna flexibility with internal or external antenna options available, and the optional
23battery backup provides uninterrupted reporting of remote Bluetooth sensor data.
24
25More information about the board can be found at the `MG100 website`_.
26
27The MG100 hardware provides support for the Nordic Semiconductor `nRF52840`_ ARM Cortex-M4F CPU,
28`Sierra Wireless HL7800`_
29and the following devices:
30
31* :abbr:`ADC (Analog to Digital Converter)`
32* CLOCK
33* FLASH
34* :abbr:`GPIO (General Purpose Input Output)`
35* :abbr:`I2C (Inter-Integrated Circuit)`
36* :abbr:`MPU (Memory Protection Unit)`
37* :abbr:`NVIC (Nested Vectored Interrupt Controller)`
38* :abbr:`PWM (Pulse Width Modulation)`
39* RADIO (Bluetooth Low Energy and 802.15.4)
40* :abbr:`RTC (nRF RTC System Clock)`
41* :abbr:`SPI (Serial Peripheral Interface)`
42* :abbr:`UART (Universal asynchronous receiver-transmitter)`
43* :abbr:`WDT (Watchdog Timer)`
44* :abbr:`QSPI (Quad Serial Peripheral Interface)`
45* :abbr:`LIS3DH (ST Micro 3-axis MEMS accelerometer)`
46* :abbr:`HL7800 (Sierra Wireless HL7800 LTE-M1/NB-IoT modem)`
47* :abbr:`SD Card`
48
49.. figure:: img/mg100.jpg
50     :align: center
51     :alt: MG100
52
53     MG100 (450-00054-K1)
54
55Hardware
56********
57
58Supported Features
59==================
60
61The MG100 board configuration supports the following
62hardware features:
63
64+-----------+------------+----------------------+
65| Interface | Controller | Driver/Component     |
66+===========+============+======================+
67| ADC       | on-chip    | adc                  |
68+-----------+------------+----------------------+
69| CLOCK     | on-chip    | clock_control        |
70+-----------+------------+----------------------+
71| FLASH     | on-chip    | flash                |
72+-----------+------------+----------------------+
73| GPIO      | on-chip    | gpio                 |
74+-----------+------------+----------------------+
75| I2C(M)    | on-chip    | i2c                  |
76+-----------+------------+----------------------+
77| MPU       | on-chip    | arch/arm             |
78+-----------+------------+----------------------+
79| NVIC      | on-chip    | arch/arm             |
80+-----------+------------+----------------------+
81| PWM       | on-chip    | pwm                  |
82+-----------+------------+----------------------+
83| RADIO     | on-chip    | Bluetooth,           |
84|           |            | ieee802154           |
85+-----------+------------+----------------------+
86| RTC       | on-chip    | system clock         |
87+-----------+------------+----------------------+
88| SPI(M/S)  | on-chip    | spi                  |
89+-----------+------------+----------------------+
90| UART      | on-chip    | serial               |
91+-----------+------------+----------------------+
92| WDT       | on-chip    | watchdog             |
93+-----------+------------+----------------------+
94| QSPI      | on-chip    | qspi/MX25R64(8MB)    |
95+-----------+------------+----------------------+
96| LIS3DH    | I2C(M)     | sensor/lis3dh        |
97+-----------+------------+----------------------+
98| HL7800    | UART       | HL7800 modem driver  |
99+-----------+------------+----------------------+
100| SDMMC     | SPI(M)     | SD Card via SPI      |
101+-----------+------------+----------------------+
102
103See `MG100 website`_ for a complete list
104of MG100 hardware features.
105
106Connections and IOs
107===================
108
109LED
110---
111
112* LED1 (red)   = P1.7
113* LED2 (blue)  = P1.6
114* LED3 (green) = P1.5
115
116Push buttons
117------------
118
119* BUTTON1 = P0.3
120
121External flash memory
122---------------------
123
124A 64Mbit external flash memory part is available for storage of application
125images and data. Refer to the `Macronix MX25R6435F datasheet`_ for further
126details.
127
128The flash memory is connected to the on-board QSPI device controller.
129
130* MX25R64 = QSPI
131
132SCK = P0.19
133IO0 = P0.20
134IO1 = P0.21
135IO2 = P0.22
136IO3 = P0.23
137CSN = P0.17
138
139LIS3DH Motion Sensor
140--------------------
141
142Motion sensor to detect if the gateway moves.
143
144IRQ IO  = P0.28
145I2C SDA = P0.26
146I2C SCL = P0.27
147
148SD Card
149-------
150
151SD card used to store large amounts of data.
152
153SPI CS   = P0.29
154SPI SCK  = P1.09
155SPI MOSI = P0.11
156SPI MISO = P0.12
157
158Programming and Debugging
159*************************
160
161Applications for the ``mg100`` board configuration can be
162built and flashed in the usual way. (see :ref:`build_an_application`
163and :ref:`application_run` for more details)
164
165The `Laird Connectivity USB-SWD Programming Kit`_ contains all the necessary
166hardware to enable programming and debugging an MG100.
167
168Flashing
169========
170
171Follow the instructions in the :ref:`nordic_segger` page to install
172and configure all the necessary software. Further information can be
173found in :ref:`nordic_segger_flashing`. Then build and flash
174applications as usual (see :ref:`build_an_application` and
175:ref:`application_run` for more details).
176
177Here is an example for the :ref:`hello_world` application.
178
179First, run your favorite terminal program to listen for output.
180
181.. note:: On the MG100,
182   the USB connector should be used to access the UART console.
183
184.. code-block:: console
185
186   $ minicom -D <tty_device> -b 115200
187
188Replace :code:`<tty_device>` with the port where the board MG100
189can be found. For example, under Linux, :code:`/dev/ttyUSB0`.
190
191Then build and flash the application in the usual way.
192
193.. zephyr-app-commands::
194   :zephyr-app: samples/hello_world
195   :board: mg100
196   :goals: build flash
197
198Debugging
199=========
200
201Refer to the :ref:`nordic_segger` page to learn about debugging Nordic boards with a
202Segger IC.
203
204Software
205********
206
207MG100 Out-of-Box Demo Software
208==============================
209The MG100 ships with an out of the box software demo.
210Check out the `BLE Gateway OOB Demo`_ source code and documentation.
211
212Testing Bluetooth on the MG100
213==============================
214Many of the Bluetooth examples will work on the MG100.
215Try them out:
216
217* :ref:`ble_peripheral`
218* :ref:`bluetooth-eddystone-sample`
219* :ref:`bluetooth-ibeacon-sample`
220
221Testing the LEDs and buttons in the MG100
222====================================================
223
224There are 2 samples that allow you to test that the buttons (switches) and LEDs on
225the board are working properly with Zephyr:
226
227.. code-block:: console
228
229   samples/basic/blinky
230   samples/basic/button
231
232You can build and flash the examples to make sure Zephyr is running correctly on
233your board. The button and LED definitions can be found in
234:zephyr_file:`boards/arm/mg100/mg100.dts`.
235
236References
237**********
238
239.. target-notes::
240
241.. _MG100 website: https://www.lairdconnect.com/iot-devices/iot-gateways/sentrius-mg100-gateway-lte-mnb-iot-and-bluetooth-5
242.. _nRF52840 Product Specification: https://infocenter.nordicsemi.com/pdf/nRF52840_PS_v1.1.pdf
243.. _Sierra Wireless HL7800: https://source.sierrawireless.com/devices/hl-series/hl7800/#sthash.641qTTwA.dpbs
244.. _J-Link Software and documentation pack: https://www.segger.com/jlink-software.html
245.. _BLE Gateway OOB Demo: https://github.com/LairdCP/Pinnacle-100-Firmware-Manifest
246.. _Macronix MX25R6435F datasheet: https://www.macronix.com/Lists/Datasheet/Attachments/7913/MX25R6435F,%20Wide%20Range,%2064Mb,%20v1.5.pdf
247.. _Laird Connectivity USB-SWD Programming Kit: https://www.lairdconnect.com/wireless-modules/programming-kits/usb-swd-programming-kit
248.. _Memfault Platform: https://docs.memfault.com/docs/mcu/pinnacle-100-guide
249.. _nRF52840: https://www.nordicsemi.com/products/nrf52840
250