Skip to content

Commit 377d6b0

Browse files
swami1494rlubos
authored andcommitted
snippets: nrf71: adding nrf71 driver debug snippets
Adding the snippets config files for nrf71 debug and verbose debug which is used for enabling nrf71_util and nrf71_log_level_dbg configs.This is for reorganizing the nrf70 and nrf71 debug snippets. Added README.rst files for the snippets. Signed-off-by: Swaminathan Gurumurthy <swaminathan.gurumurthy@nordicsemi.no>
1 parent 9b388d9 commit 377d6b0

6 files changed

Lines changed: 149 additions & 0 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
.. _snippet-nrf71-driver-debug:
2+
3+
nRF71 driver debug snippet (nrf71-driver-debug)
4+
################################################
5+
6+
.. contents::
7+
:local:
8+
:depth: 2
9+
10+
Overview
11+
********
12+
13+
This snippet enables debug logging and statistics for the nRF71 Wi-Fi® driver.
14+
Use it to debug issues in the data path and control path, such as not receiving or sending packets, failures in sending commands, or not receiving events.
15+
16+
The snippet applies the following configuration:
17+
18+
* Enables the shell (:kconfig:option:`CONFIG_SHELL`) and the network shell (:kconfig:option:`CONFIG_NET_SHELL`), and increases the shell stack size (:kconfig:option:`CONFIG_SHELL_STACK_SIZE`) to accommodate the additional shell commands.
19+
* Enables getopt-style argument parsing for shell commands (:kconfig:option:`CONFIG_SHELL_GETOPT`) and disables the shell resize command (:kconfig:option:`CONFIG_SHELL_CMDS_RESIZE`) to save space.
20+
* Enables the nRF71 utility shell commands (:kconfig:option:`CONFIG_NRF71_UTIL`) and the Wi-Fi L2 shell commands (:kconfig:option:`CONFIG_NET_L2_WIFI_SHELL`).
21+
* Enables network statistics (:kconfig:option:`CONFIG_NET_STATISTICS`), Wi-Fi statistics (:kconfig:option:`CONFIG_NET_STATISTICS_WIFI`), and the statistics user API (:kconfig:option:`CONFIG_NET_STATISTICS_USER_API`).
22+
* Enables heap runtime statistics (:kconfig:option:`CONFIG_SYS_HEAP_RUNTIME_STATS`).
23+
* Enables logging (:kconfig:option:`CONFIG_LOG`) in immediate mode (:kconfig:option:`CONFIG_LOG_MODE_IMMEDIATE`) and enables :kconfig:option:`CONFIG_PRINTK`.
24+
* Sets the nRF71 driver log level to debug (:kconfig:option:`CONFIG_WIFI_NRF71_LOG_LEVEL_DBG`).
25+
26+
.. note::
27+
Enabling :kconfig:option:`CONFIG_LOG_MODE_IMMEDIATE` can help prevent log buffer overflows, but it may impact system timing and performance.
28+
If you experience issues with system timing or performance, disable this option by setting :kconfig:option:`CONFIG_LOG_MODE_IMMEDIATE` to ``n`` in your project configuration file.
29+
30+
Usage
31+
*****
32+
33+
Apply the snippet when building, for example for the :ref:`wifi_shell_sample` sample on the nRF7120 DK:
34+
35+
With west
36+
37+
.. code-block:: console
38+
39+
west build -p -b nrf7120dk/nrf7120/cpuapp samples/wifi/shell -- -Dshell_SNIPPET="nrf71-driver-debug"
40+
41+
With CMake
42+
43+
.. code-block:: console
44+
45+
cmake -GNinja -Bbuild -DBOARD=nrf7120dk/nrf7120/cpuapp -Dshell_SNIPPET="nrf71-driver-debug" samples/wifi/shell
46+
ninja -C build
47+
48+
See also
49+
********
50+
51+
* :ref:`ug_nrf70_developing_debugging` for the equivalent guidance for the nRF70 Series.
52+
* :ref:`snippet-nrf71-driver-verbose-debug` for additional IPC-level debug logging.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#
2+
# Copyright (c) 2026 Nordic Semiconductor
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
CONFIG_SHELL=y
8+
CONFIG_SHELL_STACK_SIZE=5400
9+
CONFIG_NET_SHELL=y
10+
CONFIG_SHELL_GETOPT=y
11+
CONFIG_SHELL_CMDS_RESIZE=n
12+
CONFIG_NRF71_UTIL=y
13+
CONFIG_NET_L2_WIFI_SHELL=y
14+
CONFIG_NET_STATISTICS=y
15+
CONFIG_NET_STATISTICS_WIFI=y
16+
CONFIG_NET_STATISTICS_USER_API=y
17+
CONFIG_SYS_HEAP_RUNTIME_STATS=y
18+
CONFIG_LOG=y
19+
CONFIG_LOG_MODE_IMMEDIATE=y
20+
CONFIG_PRINTK=y
21+
CONFIG_WIFI_NRF71_LOG_LEVEL_DBG=y
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name: nrf71-driver-debug
2+
append:
3+
EXTRA_CONF_FILE: nrf71-driver-debug.conf
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
.. _snippet-nrf71-driver-verbose-debug:
2+
3+
nRF71 driver verbose debug snippet (nrf71-driver-verbose-debug)
4+
################################################################
5+
6+
.. contents::
7+
:local:
8+
:depth: 2
9+
10+
Overview
11+
********
12+
13+
This snippet extends :ref:`snippet-nrf71-driver-debug` with a larger WPA supplicant thread stack, so that the additional debug logging emitted while the driver is at debug log level does not overflow that thread's stack.
14+
Use it in the same situations as :ref:`snippet-nrf71-driver-debug`, when the extra stack margin is needed, for example when the driver debug logs are emitted from the WPA supplicant thread context.
15+
16+
The snippet applies the same configuration as :ref:`snippet-nrf71-driver-debug`, plus the following:
17+
18+
* Increases the WPA supplicant thread stack size (:kconfig:option:`CONFIG_WIFI_NM_WPA_SUPPLICANT_THREAD_STACK_SIZE`) to accommodate the additional logging.
19+
20+
.. note::
21+
Unlike the equivalent nRF70 Series snippet (``nrf70-driver-verbose-debug``), this snippet does not enable bus interface level logging.
22+
.. note::
23+
Enabling :kconfig:option:`CONFIG_LOG_MODE_IMMEDIATE` can help prevent log buffer overflows, but it may impact system timing and performance.
24+
If you experience issues with system timing or performance, disable this option by setting :kconfig:option:`CONFIG_LOG_MODE_IMMEDIATE` to ``n`` in your project configuration file.
25+
26+
Usage
27+
*****
28+
29+
Apply the snippet when building, for example for the :ref:`wifi_shell_sample` sample on the nRF7120 DK:
30+
31+
With west
32+
33+
.. code-block:: console
34+
35+
west build -p -b nrf7120dk/nrf7120/cpuapp samples/wifi/shell -- -Dshell_SNIPPET="nrf71-driver-verbose-debug"
36+
37+
With CMake
38+
39+
.. code-block:: console
40+
41+
cmake -GNinja -Bbuild -DBOARD=nrf7120dk/nrf7120/cpuapp -Dshell_SNIPPET="nrf71-driver-verbose-debug" samples/wifi/shell
42+
ninja -C build
43+
44+
See also
45+
********
46+
47+
* :ref:`ug_nrf70_developing_debugging` for the equivalent guidance for the nRF70 Series.
48+
* :ref:`snippet-nrf71-driver-debug` for the base set of driver debug logs and statistics.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#
2+
# Copyright (c) 2026 Nordic Semiconductor
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
CONFIG_SHELL=y
8+
CONFIG_SHELL_STACK_SIZE=5400
9+
CONFIG_WIFI_NM_WPA_SUPPLICANT_THREAD_STACK_SIZE=5900
10+
CONFIG_NET_SHELL=y
11+
CONFIG_SHELL_GETOPT=y
12+
CONFIG_SHELL_CMDS_RESIZE=n
13+
CONFIG_NRF71_UTIL=y
14+
CONFIG_NET_L2_WIFI_SHELL=y
15+
CONFIG_NET_STATISTICS=y
16+
CONFIG_NET_STATISTICS_WIFI=y
17+
CONFIG_NET_STATISTICS_USER_API=y
18+
CONFIG_SYS_HEAP_RUNTIME_STATS=y
19+
CONFIG_LOG=y
20+
CONFIG_LOG_MODE_IMMEDIATE=y
21+
CONFIG_PRINTK=y
22+
CONFIG_WIFI_NRF71_LOG_LEVEL_DBG=y
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name: nrf71-driver-verbose-debug
2+
append:
3+
EXTRA_CONF_FILE: nrf71-driver-verbose-debug.conf

0 commit comments

Comments
 (0)