Skip to content

Commit 2a33a36

Browse files
greg-fernordicjm
authored andcommitted
doc: nrf91: snippet page edits
Edited the snippet page under Developing with nRF91 for style and consistency. NRFU-1011. Signed-off-by: Grzegorz Ferenc <[email protected]>
1 parent 38f6343 commit 2a33a36

File tree

2 files changed

+43
-33
lines changed

2 files changed

+43
-33
lines changed

doc/nrf/device_guides/nrf91/nrf91_programming.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Compatible versions of modem and application
2121

2222
When you update the application firmware on an nRF91 Series DK, make sure that the modem firmware and application firmware are compatible versions.
2323

24+
.. _build_pgm_nrf9160_board_controller:
25+
2426
Selecting board controller on nRF9160 DK
2527
****************************************
2628

doc/nrf/device_guides/nrf91/nrf91_snippet.rst

Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,34 @@ Snippets for an nRF91 Series device
77
:local:
88
:depth: 2
99

10-
1110
nRF91 Series' :ref:`app_build_snippets` are tailored for tracing on the nRF91 Series devices but can work with other boards as well.
12-
On nRF91 Series devices, snippets are used for the following functionalities:
13-
14-
* Modem tracing with the flash backend
15-
* Modem tracing with the UART backend
16-
* To activate TF-M logging while having modem traces enabled
11+
On nRF91 Series devices, you can enable the following functionalities using snippets:
12+
13+
.. list-table::
14+
:header-rows: 1
15+
16+
* - Functionality
17+
- Snippet name
18+
- Compatible board targets
19+
* - :ref:`nrf91_modem_trace_ext_flash_snippet`
20+
- ``nrf91-modem-trace-ext-flash``
21+
- ``nrf9151dk/nrf9151/ns``, ``nrf9161dk/nrf9161/ns``, ``nrf9160dk/nrf9160/ns``, ``nrf9131ek/nrf9131/ns``
22+
* - :ref:`nrf91_modem_trace_uart_snippet`
23+
- ``nrf91-modem-trace-uart``
24+
- :ref:`All nRF91 Series board targets <ug_nrf91>`
25+
* - :ref:`tfm_enable_share_uart`
26+
- ``tfm-enable-share-uart``
27+
- :ref:`All nRF91 Series board targets <ug_nrf91>`
1728

1829
.. _nrf91_modem_trace_ext_flash_snippet:
1930

2031
nRF91 modem traces with flash backend using snippets
2132
****************************************************
2233

23-
Snippet enables modem tracing, the flash backend, and external flash and configures them to store modem traces to a dedicated partition on the external flash for supported boards.
34+
The ``nrf91-modem-trace-ext-flash`` snippet enables modem tracing, the flash backend, and external flash and configures them to store modem traces to a dedicated partition on the external flash for supported boards.
2435
To change the partition size, the project needs to configure the :kconfig:option:`CONFIG_NRF_MODEM_LIB_TRACE_BACKEND_FLASH_PARTITION_SIZE` Kconfig option.
2536

26-
The following board targets have support for this snippet:
27-
28-
* ``nrf9151dk/nrf9151/ns``
29-
* ``nrf9161dk/nrf9161/ns``
30-
* ``nrf9160dk/nrf9160/ns``
31-
* ``nrf9131ek/nrf9131/ns``
32-
33-
To enable modem traces with the flash backend, use the following command, where *board_target* corresponds to your development kit board target and `<image_name>` to your application image name:
37+
To enable modem traces with the flash backend, use the following command pattern, where *board_target* corresponds to your board target and `<image_name>` to your application image name:
3438

3539
.. parsed-literal::
3640
:class: highlight
@@ -42,46 +46,50 @@ To enable modem traces with the flash backend, use the following command, where
4246
nRF91 modem tracing with UART backend using snippets
4347
****************************************************
4448

45-
Snippet enables the :kconfig:option:`CONFIG_NRF_MODEM_LIB_TRACE` Kconfig option and chooses the Zephyr UART driver for the backend, with the necessary Kconfig options.
49+
The ``nrf91-modem-trace-uart`` snippet enables the :kconfig:option:`CONFIG_NRF_MODEM_LIB_TRACE` Kconfig option and chooses the Zephyr UART driver for the backend, with the necessary Kconfig options.
4650
The snippet also enables the UART1 peripheral with a baud rate of 1 Mbd and hardware flow control enabled.
4751
If this configuration does not match your requirements, you can add a snippet or Kconfig and devicetree overlays to your application with the desired setup.
52+
53+
.. note::
54+
If you are using the nRF9160 DK, remember to :ref:`set the board controller switch to the **nRF91** position <build_pgm_nrf9160_board_controller>` before programming.
55+
4856
To enable modem tracing with the UART trace backend on a nRF91 device, add the ``nrf91-modem-trace-uart`` snippet to the :term:`build configuration`.
4957
This can be done in one of the following ways:
5058

51-
With west
52-
=========
59+
.. tabs::
5360

54-
To add the modem trace UART snippet when building an application with west, use the following command, where *board_target* corresponds to your development kit board target and `<image_name>` to your application image name:
61+
.. group-tab:: west
5562

56-
.. parsed-literal::
57-
:class: highlight
63+
To add the modem trace UART snippet when building an application with west, use the following command pattern, where *board_target* corresponds to your board target and `<image_name>` to your application image name:
5864

59-
west build --board *board_target* -- -D<image_name>_SNIPPET="nrf91-modem-trace-uart"
65+
.. parsed-literal::
66+
:class: highlight
6067
61-
.. note::
62-
With :ref:`sysbuild <configuration_system_overview_sysbuild>`, using the ``west build -S`` option applies the snippet to all images.
63-
Therefore, use the CMake argument instead, specifying the application image.
68+
west build --board *board_target* -- -D<image_name>_SNIPPET="nrf91-modem-trace-uart"
69+
70+
.. note::
71+
With :ref:`sysbuild <configuration_system_overview_sysbuild>`, using the ``west build -S`` option applies the snippet to all images.
72+
Therefore, use the CMake argument instead, specifying the application image.
6473

65-
With CMake
66-
==========
74+
.. group-tab:: CMake
6775

68-
To add the modem trace UART snippet when building an application with CMake, add the following command to the CMake arguments:
76+
To add the modem trace UART snippet when building an application with CMake, add the following command to the CMake arguments:
6977

70-
.. code-block:: console
78+
.. code-block:: console
7179
72-
-D<image_name>_SNIPPET="nrf91-modem-trace-uart" [...]
80+
-D<image_name>_SNIPPET="nrf91-modem-trace-uart" [...]
7381
74-
To build with the |nRFVSC|, specify ``-D<image_name>_SNIPPET="nrf91-modem-trace-uart" [...]`` in the **Extra CMake arguments** field.
82+
To build with the |nRFVSC|, specify ``-D<image_name>_SNIPPET="nrf91-modem-trace-uart" [...]`` in the **Extra CMake arguments** field.
7583

76-
See :ref:`cmake_options` for more details.
84+
See :ref:`cmake_options` for more details.
7785

7886
.. _tfm_enable_share_uart:
7987

8088
Shared UART for application and TF-M logging
8189
********************************************
8290

8391
If you want to activate TF-M logging while having modem traces enabled, it can be useful to direct the TF-M logs to the UART (**UART0**) used by the application.
84-
To activate both modem traces and TF-M logs, use the following command:
92+
To activate both modem traces and TF-M logs, use the following command pattern, where *board_target* corresponds to your board target:
8593

8694
.. parsed-literal::
8795
:class: highlight

0 commit comments

Comments
 (0)