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
Edited tfm_logging.rst page not to mention UART0 as the only
peripheral that can be used for logging.
NCSDK-33550.
Signed-off-by: Grzegorz Ferenc <[email protected]>
Copy file name to clipboardExpand all lines: doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,7 @@ Security
120
120
121
121
* Added the new section about :ref:`ug_crypto_index`.
122
122
The new section includes pages about :ref:`ug_crypto_architecture` (new page) and :ref:`crypto_drivers` (moved from :ref:`nrf_security` library).
123
+
* Updated the :ref:`ug_tfm_logging` page with more details about how to configure logging on the same UART instance as the application for nRF5340 and nRF91 Series devices.
Copy file name to clipboardExpand all lines: doc/nrf/security/tfm/tfm_logging.rst
+29-11Lines changed: 29 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,25 +9,43 @@ TF-M logging
9
9
:depth: 2
10
10
11
11
TF-M employs two UART interfaces for logging: one for the :ref:`Secure Processing Environment<app_boards_spe_nspe>` (including MCUboot and TF-M), and one for the :ref:`Non-Secure Processing Environment<app_boards_spe_nspe>` (including user application).
12
-
By default, the logs arrive on different COM ports on the host PC.
13
12
14
-
Configuring logging
15
-
*******************
13
+
By default, the logs from Nordic Semiconductor's Development Kits (DKs) arrive on different COM ports on the host PC.
14
+
The UART instances can vary by device family:
16
15
17
-
You can configure the TF-M to connect to the same UART as the application with the :kconfig:option:`CONFIG_TFM_SECURE_UART0` Kconfig option.
18
-
Setting this Kconfig option makes TF-M logs visible on the application's VCOM, without manual connection.
16
+
* nRF5340 and nRF91 Series: The application typically uses the UART instance ``0`` (``uart0``), and TF-M uses the UART instance ``1`` (``uart1``) by default.
17
+
* nRF54L Series: The application typically uses the UART instance ``20`` (``uart20``), and TF-M uses the UART instance ``30`` (``uart30``) by default.
19
18
20
-
The UART instance used by the application is ``0`` by default, and the TF-M UART instance is ``1``.
21
-
To change the TF-M UART instance to the same as that of the application's, use the :kconfig:option:`CONFIG_TFM_SECURE_UART0` Kconfig option.
19
+
For more information about the logging in the |NCS|, see :ref:`ug_logging`.
22
20
23
-
When building TF-M with logging enabled, UART1 must be disabled in the non-secure application, otherwise the non-secure application will fail to run.
24
-
The recommended way to do this is to copy the :file:`.overlay` file from the :ref:`tfm_hello_world` sample.
21
+
Configuring logging to the same UART as the application
When the TF-M and the user application use the same UART, the TF-M disables logging after it has booted and re-enables it again only to log a fatal error.
25
+
This option is not available to nRF54L Series devices.
26
+
27
+
For nRF5340 and nRF91 Series devices, you can configure TF-M to connect to the same UART as the application.
28
+
Setting the appropriate Kconfig option makes TF-M logs automatically visible on the application's UART.
29
+
30
+
To configure TF-M to connect to the same UART as the application, you can use the ``CONFIG_TFM_SECURE_UART`` Kconfig options, for example :kconfig:option:`CONFIG_TFM_SECURE_UART0` for the example above.
31
+
32
+
When building TF-M with logging enabled, UART instance used by TF-M must be disabled in the non-secure application, otherwise the non-secure application will fail to run.
33
+
The recommended way to do this is by setting it in an :file:`.overlay` file.
34
+
For example, assuming TF-M uses the ``uart1`` instance and :kconfig:option:`CONFIG_TFM_SECURE_UART0` is set, you can disable TF-M's UART instance in the devicetree overlay file like this:
35
+
36
+
.. code-block:: dts
37
+
38
+
&uart1 {
39
+
status = "disabled";
40
+
};
41
+
42
+
See :ref:`zephyr:set-devicetree-overlays` in the Zephyr documentation for more information about configuring devicetree overlays and :ref:`cmake_options` in the |NCS| documentation for how to provide overlay files to the build system.
43
+
44
+
.. note::
45
+
When TF-M and the user application use the same UART, TF-M disables logging after it has booted and re-enables it again only to log a fatal error.
28
46
29
47
Disabling logging
30
-
=================
48
+
*****************
31
49
32
50
To disable logging, enable the :kconfig:option:`CONFIG_TFM_LOG_LEVEL_SILENCE` option.
0 commit comments