Skip to content

Commit d23367c

Browse files
committed
doc: Misc improvements
Doing small updates: - Add doc building - Add missing Kconfig description to Configuration page - Improvements to logging - Remove release plan before v1.0.0 Signed-off-by: Tommi Rantanen <tommi.rantanen@nordicsemi.no>
1 parent 89894a8 commit d23367c

5 files changed

Lines changed: 50 additions & 14 deletions

File tree

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,3 @@ The Serial Modem contains the Serial Modem application for nRF91-based devices,
44
It includes host examples in the form of the Serial Modem AT Client library and the Serial Modem AT Client Shell sample.
55

66
You can find the documentation in the [Serial Modem] (https://docs.nordicsemi.com/bundle/addon-serial_modem-latest/page/index.html) documentation.
7-
8-
Serial Modem release plan looks as follows:
9-
10-
* v0.3.0: 19-Dec-2025
11-
* Aligns with NCS 3.2.0 release meaning SM v0.3.0 will be released 1-10 days after the NCS
12-
* v1.0.0: 20-Feb-2026
13-
* Official Serial Modem release after which changes in v1.x.x releases are backwards compatible

doc/app/sm_build_and_run.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ Using the LwM2M carrier library
215215
The application supports the |NCS| `LwM2M carrier`_ library that you can use to connect to the operator's device management platform.
216216
See the library's documentation for more information and configuration options.
217217

218-
To enable the LwM2M carrier library, add the parameter ``-DOVERLAY_CONFIG=overlay-carrier.conf`` to your build command.
218+
To enable the LwM2M carrier library, add the parameter ``-DEXTRA_CONF_FILE=overlay-carrier.conf`` to your build command.
219219

220220
The CA root certificates that are needed for modem FOTA are not provisioned in the |SM| application.
221221
You can flash the `Cellular: LwM2M carrier`_ sample to write the certificates to modem before flashing the |SM| application, or use the `Cellular: AT Client`_ sample as explained in `preparing the Cellular: LwM2M Client sample for production <lwm2m_client_provisioning_>`_.

doc/app/sm_configuration.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,14 @@ CONFIG_SM_UART_TX_BUF_SIZE - Send buffer size for UART.
203203
This option defines the size of the buffer for sending (TX) UART traffic.
204204
The default value is 256.
205205

206+
.. _CONFIG_SM_URC_BUFFER_SIZE:
207+
208+
CONFIG_SM_URC_BUFFER_SIZE - URC buffer size.
209+
Buffer, in which unsolicited result codes (URC) are stored before being sent to the host.
210+
The buffer has to be large enough to hold the largest URC that can be sent by the modem.
211+
Result codes longer than this size will get dropped.
212+
The default value is 4096.
213+
206214
.. _CONFIG_SM_PPP_FALLBACK_MTU:
207215

208216
CONFIG_SM_PPP_FALLBACK_MTU - Control the MTU used by PPP.

doc/app/sm_logging.rst

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,51 @@ To switch to ``UART0`` output for application logs, change the following options
3131
CONFIG_LOG_BACKEND_RTT=n
3232
CONFIG_LOG_BACKEND_UART=y
3333

34+
The default logging level for the |SM| is ``CONFIG_SM_LOG_LEVEL_INF``.
35+
You can get more verbose logs by setting the ``CONFIG_SM_LOG_LEVEL_DBG`` Kconfig option.
36+
37+
TF-M logging must use the same UART as the application. For more details, see `shared TF-M logging`_.
38+
3439
Modem traces
3540
************
3641

3742
To send modem traces over UART on an nRF91 Series DK, configuration must be added for the UART device in the devicetree and Kconfig.
38-
This is done by adding the `modem trace UART snippet`_ when building and programming.
43+
This is done by adding the `modem trace UART snippet`_ (``-Dapp_SNIPPET=nrf91-modem-trace-uart``) when building and programming.
3944

4045
Use the `Cellular Monitor app`_ for capturing and analyzing modem traces.
4146

42-
TF-M logging must use the same UART as the application. For more details, see `shared TF-M logging`_.
47+
.. note::
48+
49+
When measuring power consumption while the modem is active, the modem traces must not be active.
50+
If the build includes modem traces, the traces must be deactivated with ``AT%XMODEMTRACE=0``, before taking measurements.
51+
Active traces show approximately 700 uA overhead on the power consumption.
52+
53+
If ``hw-flow-control`` is enabled for the trace UART in the devicetree (it is disabled by default), the same approximately 700 uA overhead is present even when the traces are deactivated using ``AT%XMODEMTRACE=0``.
54+
``hw-flow-control`` prevents the trace UART from sending, when there is no reader for the data.
55+
This prevents the trace UART from suspending, as it cannot empty its buffers.
56+
57+
.. note::
58+
59+
Modem traces captured through UART are corrupted if application logs through RTT are simultaneously captured.
60+
When capturing modem traces through UART with the `Cellular Monitor app`_ and simultaneously capturing RTT logs, for example, with J-Link RTT Viewer, the modem trace misses packets, and captured packets might have incorrect information.
61+
62+
If you need to capture modem traces and RTT logs at the same time, enable HW flow control for modem trace UART.
63+
This can be done for the `nRF9151 DK <nrf9151dk_>`_ by adding the following change to :file:`app/boards/nrf9151dk_nrf9151_ns.overlay`:
64+
65+
.. parsed-literal::
66+
:class: highlight
67+
68+
&uart1 {
69+
hw-flow-control;
70+
};
71+
72+
Otherwise, you can choose not to capture RTT logs.
73+
Having only RTT logs enabled does not cause this issue.
4374

4475
.. _sm_modem_trace_cmux:
4576

46-
Collecting modem traces through CMUX backend
47-
********************************************
77+
Modem traces through CMUX
78+
*************************
4879

4980
The |SM| application supports collecting modem traces through the CMUX multiplexer.
5081
When enabled, modem traces are sent through a dedicated CMUX channel, allowing simultaneous AT commands, PPP data, and trace collection over the same serial port.
@@ -61,7 +92,7 @@ To use the CMUX trace backend, build the |SM| application with the trace backend
6192
6293
For optimal throughput and to minimize trace data loss, configure the UART to run at maximum speed:
6394

64-
1. Set the UART speed in your device tree configuration (for example, 1000000 baud).
95+
1. Set the UART speed in your devicetree configuration (for example, 1000000 baud).
6596
#. Use the ``-b`` parameter with the script to match this speed (for example, ``-b 1000000``).
6697

6798
.. note::
@@ -89,7 +120,7 @@ The stop script automatically terminates trace collection and preserves the trac
89120

90121
.. code-block:: console
91122
92-
# Start PPP connection with trace collection with baud rate matching the device tree setting
123+
# Start PPP connection with trace collection with baud rate matching the devicetree setting
93124
$ sudo scripts/sm_start_ppp.sh -b 1000000 -T
94125
Trace file: /var/log/nrf91-modem-trace.bin
95126
Connect and wait for PPP link...

doc/gsg_guide.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ Complete the following steps for building and running:
7070

7171
west build -p -b nrf9151dk/nrf9151/ns
7272

73+
To build the application with Kconfig and DTC overlays and extra Kconfig options, the following command gives an example of how they are passed as build arguments::
74+
75+
west build -p -b nrf9151dk/nrf9151/ns -- -DEXTRA_CONF_FILE="overlay-ppp.conf;overlay-cmux.conf" -DEXTRA_DTC_OVERLAY_FILE="overlay-external-mcu.overlay" -DCONFIG_SM_LOG_LEVEL_DBG=y
76+
7377
#. To program the application, run the following command::
7478

7579
west flash

0 commit comments

Comments
 (0)