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: doc/app/CMUX_AT_commands.rst
-12Lines changed: 0 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,18 +20,6 @@ For example, it can be used to exchange AT data and have a :ref:`Point-to-Point
20
20
CMUX is enabled in |SM| by compiling it with the appropriate configuration files, depending on your use case.
21
21
See the :ref:`sm_config_files` section for more information.
22
22
23
-
.. sm_cmux_baud_rate_note_start
24
-
25
-
.. note::
26
-
27
-
The maximum recommended baud rate is 460 800.
28
-
At higher baud rates (921 600, 1 000 000), it is possible for bytes to come in faster than the chip is able to handle, which causes the buffer space to run out if it goes on for too long.
29
-
UART RX is not disabled in that case, which results in data loss and communication failures.
30
-
31
-
At a baud rate of 460 800, the maximum throughput is slightly below that of the nRF91 Series modem when using LTE-M.
32
-
33
-
.. sm_cmux_baud_rate_note_end
34
-
35
23
.. note::
36
24
37
25
|SM| does not have an equivalent to the ``AT+CMUX`` command described in 3GPP TS 27.007.
Copy file name to clipboardExpand all lines: doc/app/Generic_AT_commands.rst
+22-10Lines changed: 22 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,14 +125,24 @@ The test command is not supported.
125
125
Power saving #XSLEEP
126
126
====================
127
127
128
-
The ``#XSLEEP`` command makes the nRF91 Series System in Package (SiP) enter idle or sleep mode.
128
+
The ``#XSLEEP`` command makes the |SM| application to enter idle or sleep mode.
129
+
130
+
.. note::
131
+
132
+
The ``#XSLEEP`` command is intended for experimentation and power consumption measurements and must not be used in production.
133
+
134
+
You can use the DTR (Data Terminal Ready) and RI (Ring Indicator) signals to control the power state of the UART between the |SM| and the host.
135
+
See the :ref:`sm_dtr_ri` section for more information about DTR and RI.
136
+
137
+
.. note::
138
+
139
+
If you want to do power measurements on the nRF91 Series development kit while running the |SM| application, remember to disable unused peripherals.
129
140
130
-
If you want to do power measurements on the nRF91 Series development kit while running the |SM| application, disable unused peripherals.
131
141
132
142
Set command
133
143
-----------
134
144
135
-
The set command makes the nRF91 Series SiP enter either Idle or Sleep mode.
145
+
The set command makes the |SM| application enter either Idle or Sleep mode.
136
146
137
147
Syntax
138
148
~~~~~~
@@ -146,15 +156,17 @@ The ``<sleep_mode>`` parameter accepts only the following integer values:
146
156
* ``1`` - Enter Sleep.
147
157
In this mode, both the |SM| service and the LTE connection are terminated.
148
158
149
-
The nRF91 Series SiP can be woken up using the pin specified with the :ref:`CONFIG_SM_POWER_PIN <CONFIG_SM_POWER_PIN>` Kconfig option.
159
+
|SM| can be woken up using the DTR pin (``dtr-gpios``).
150
160
151
161
* ``2`` - Enter Idle.
152
-
In this mode, both the |SM| service and the LTE connection are maintained.
162
+
In this mode, both the |SM| service and the LTE connection are maintained, but the UART is disabled to save power.
163
+
Received data is buffered and sent to the host after idle mode is exited.
164
+
165
+
|SM| can exit the idle mode using the DTR pin (``dtr-gpios``).
166
+
When the |SM| is in idle mode, and there is data to be read by the host, the RI pin (``ri-gpios``) is asserted for a short period of time to notify the host.
167
+
The host can then deassert and assert DTR to exit idle mode and read the data.
153
168
154
-
The nRF91 Series SiP can be made to exit idle using the pin specified with the :ref:`CONFIG_SM_POWER_PIN <CONFIG_SM_POWER_PIN>` Kconfig option.
155
-
If the :ref:`CONFIG_SM_INDICATE_PIN <CONFIG_SM_INDICATE_PIN>` Kconfig option is defined, |SM| toggles the specified pin when there is data for the MCU to read.
156
-
The MCU can in turn make |SM| exit idle by toggling the pin specified with the :ref:`CONFIG_SM_POWER_PIN <CONFIG_SM_POWER_PIN>` Kconfig option.
157
-
The data is buffered when |SM| is idle and sent to the MCU after having exited idle.
169
+
The DTR pin is defined either in the :file:`boards/*_ns.overlay` overlay file matching your board or in the :file:`overlay-external-mcu.overlay` overlay file, if it is included.
158
170
159
171
.. note::
160
172
@@ -240,7 +252,7 @@ Syntax
240
252
241
253
.. note::
242
254
243
-
In this case the nRF91 Series SiP cannot be woken up using the pin specified with the :ref:`CONFIG_SM_POWER_PIN <CONFIG_SM_POWER_PIN>` Kconfig option.
255
+
In this case the nRF91 Series SiP cannot be woken up using the DTR pin (``dtr-gpios``).
Copy file name to clipboardExpand all lines: doc/app/nRF91_as_Zephyr_modem.rst
+11-16Lines changed: 11 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ nRF91 Series as a Zephyr-compatible modem
10
10
Overview
11
11
********
12
12
13
-
Starting with |NCS| v2.6.0, the |SM| (SM) application can be used to turn an nRF91 Series SiP into a standalone modem that can be used through Zephyr's cellular modem driver.
13
+
The |SM| application can be used to turn an nRF91 Series SiP into a standalone modem that can be used through Zephyr's cellular modem driver.
14
14
This means that the controlling chip can run a Zephyr application that seamlessly uses Zephyr's IP stack instead of offloaded sockets through AT commands.
15
15
16
16
This is made possible by |SM|'s support of CMUX and PPP and Zephyr's cellular modem driver.
@@ -32,10 +32,6 @@ For that, Kconfig fragments and devicetree overlays must be added to the compila
32
32
33
33
See the :ref:`sm_config_files` section for information on how to compile with additional configuration files and a description of some of the mentioned Kconfig fragments.
34
34
35
-
.. include:: CMUX_AT_commands.rst
36
-
:start-after: sm_cmux_baud_rate_note_start
37
-
:end-before: sm_cmux_baud_rate_note_end
38
-
39
35
nRF91 Series SiP running |SM|
40
36
=============================
41
37
@@ -44,20 +40,20 @@ The following configuration files must be included:
44
40
* :file:`overlay-cmux.conf` - To enable CMUX.
45
41
* :file:`overlay-ppp.conf` - To enable PPP.
46
42
* :file:`overlay-zephyr-modem.conf` - To tailor |SM| to how Zephyr's cellular modem driver works.
47
-
This enables the :ref:`CONFIG_SM_START_SLEEP <CONFIG_SM_START_SLEEP>` Kconfig option, which makes the nRF91 Series SiP start only when the :ref:`power pin <CONFIG_SM_POWER_PIN>` is toggled.
48
43
49
44
In addition, if the controlling chip is an external MCU, the following configurations must also be included:
50
45
51
-
* :ref:`CONFIG_SM_POWER_PIN <CONFIG_SM_POWER_PIN>` Kconfig option - To define the power pin so that it matches your setup.
52
-
* :file:`overlay-external-mcu.overlay` - To configure which UART |SM| will use.
53
-
The actual configuration of the UART is defined in the :file:`*_ns.overlay` overlay file matching your board in the :file:`boards` directory.
46
+
* :file:`overlay-external-mcu.overlay` - To configure UART (pins, baud rate), DTR and RI pins that |SM| will use.
54
47
Make sure to update the UART configuration (pins, baud rate) so that it matches your setup.
55
-
You can do this by modifying the properties of the node of the UART to be used, by editing either :file:`overlay-external-mcu.overlay` or the overlay file matching your board in the :file:`boards` directory.
48
+
* :file:`overlay-zephyr-modem-external-mcu.overlay` - To define the power GPIO with ``sm-power-key``. If ``sm-power-key`` is configured, the nRF91 Series SIP will start only when the pin in ``sm-power-key`` is toggled by the controlling chip.
49
+
On the controlling chip, running Zephyr, the power GPIO is configured with the ``mdm-power-gpios``.
50
+
This overlay also sets the DTR pin to be always asserted, as the Zephyr's cellular modem driver does not currently manage it.
56
51
57
52
Or, if the controlling chip is the nRF52840 of the nRF9160 DK, the following files must also be included:
58
53
59
-
* :file:`overlay-zephyr-modem-nrf9160dk-nrf52840.conf` - To define the power pin.
60
-
* :file:`overlay-zephyr-modem-nrf9160dk-nrf52840.overlay` - To configure the UART to be routed between the nRF9160 and the nRF52840 of the DK.
54
+
* :file:`overlay-zephyr-modem-nrf9160dk-nrf52840.overlay` - To configure the UART, DTR, and RI pins, to be routed between the nRF9160 and the nRF52840 of the DK.
55
+
This overlay also sets the DTR pin to be always asserted, as the Zephyr's cellular modem driver does not currently manage it.
56
+
Note that there is no power pin as there are not enough GPIOs available to use it.
61
57
62
58
Finally, if you want more verbose logging that includes the AT commands and responses, you can enable debug logging by uncommenting ``CONFIG_SM_LOG_LEVEL_DBG=y`` in the :file:`prj.conf` configuration file.
63
59
@@ -69,7 +65,7 @@ Configuration files found in `Zephyr’s Cellular modem`_ sample are a good star
69
65
Specifically, regardless of what the controlling chip is, the Kconfig options found in the following files are needed:
70
66
71
67
* :file:`prj.conf` - This file enables various Zephyr APIs, most of which are needed for proper functioning of the application.
72
-
* :file:`boards/nrf9160dk_nrf52840.conf` - This file tailors the configuration of the modem subsystem and driver to the |SM|.
68
+
* :file:`boards/nrf9160dk_nrf9160_ns.conf` (or :file:`boards/nrf9160dk_nrf52840.conf`) - This file tailors the configuration of the modem subsystem and driver to the |SM|.
73
69
It makes the application's logs be output on UART 0 and also enables the debug logs of the cellular modem driver.
74
70
If you do not want the debug logs output by the driver, you may turn them off by removing ``CONFIG_MODEM_LOG_LEVEL_DBG=y``.
75
71
@@ -93,7 +89,7 @@ You can even compile, flash and run the sample to verify proper operation of the
93
89
Flashing and running
94
90
********************
95
91
96
-
When built with the Zephyr-compatible modem configuration, |SM| will put the nRF91 Series SiP to deep sleep when powered on.
92
+
When built with the Zephyr-compatible modem configuration, and :file:`overlay-zephyr-modem-external-mcu.overlay` is used, |SM| will put the nRF91 Series SiP to deep sleep when powered on.
97
93
Zephyr's cellular modem driver running on the controlling chip will take care of waking up the nRF91 Series SiP, so it is advised to first flash |SM| to the nRF91 Series SiP.
98
94
99
95
However, before flashing the |SM| built with the Zephyr-compatible modem configuration, make sure that the nRF91 Series modem has been set to the desired system mode.
@@ -126,10 +122,9 @@ Under Linux, if the controlling chip is the nRF52840 of the nRF9160 DK, the devi
126
122
After both applications have been flashed to their respective chips and you are connected to receive logs, you can reset the controlling chip.
127
123
When the Zephyr application starts up, the following happens:
128
124
129
-
* If power management is enabled (the ``CONFIG_PM_DEVICE`` Kconfig option is set to ``y``): when the application powers on the modem (by calling ``pm_device_action_run(<dev>, PM_DEVICE_ACTION_RESUME)`` as the sample does), the cellular modem driver will toggle the modem's power pin to wake it up.
125
+
* If power management is enabled (the :file:`overlay-zephyr-modem-external-mcu.overlay` is included): when the application powers on the modem (by calling ``pm_device_action_run(<dev>, PM_DEVICE_ACTION_RESUME)`` as the sample does), the cellular modem driver will toggle the modem's power pin to wake it up.
130
126
131
127
If power management is not enabled, the cellular modem driver will automatically proceed and expect |SM| to already be started and in a pristine state.
132
-
In this case, |SM| should be compiled with the :ref:`CONFIG_SM_START_SLEEP <CONFIG_SM_START_SLEEP>` Kconfig option set to ``n``, and :ref:`CONFIG_SM_POWER_PIN <CONFIG_SM_POWER_PIN>` can be left undefined.
133
128
134
129
* The cellular modem driver will start sending AT commands to |SM|.
135
130
It will enable the network status notifications, gather some information from the modem, enable CMUX, and set the modem to normal mode (with an ``AT+CFUN=1`` command).
0 commit comments