Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples: wifi: radio_test: Add a single domain combo radio test #19203

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@
/doc/nrf/samples/tfm.rst @nrfconnect/ncs-aegir-doc
/doc/nrf/samples/thread.rst @nrfconnect/ncs-terahertz-doc
/doc/nrf/samples/wifi.rst @nrfconnect/ncs-wifi-doc
/doc/nrf/samples/wifi_radiotest.rst @nrfconnect/ncs-wifi-doc
/doc/nrf/samples/wifi_provisioning.rst @nrfconnect/ncs-wifi-doc
/doc/nrf/samples/wifi_zephyr.rst @nrfconnect/ncs-wifi-doc
/doc/nrf/samples/zigbee.rst @nrfconnect/ncs-terahertz-doc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,13 @@ Zigbee samples
Wi-Fi samples
-------------

|no_changes_yet_note|
* Added:

* The :ref:`wifi_radio_test_sd` sample to demonstrate the Wi-Fi and Bluetooth LE radio test running on the application core.

* Updated:

* The :ref:`wifi_radio_test` sample is now moved to :zephyr_file:`samples/wifi/radio_test/multi_domain`.

Other samples
-------------
Expand Down
1 change: 1 addition & 0 deletions doc/nrf/samples/wifi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ This section lists the available |NCS| samples for the :ref:`Wi-Fi® <ug_wifi>`
:glob:

../../../samples/wifi/*/README
wifi_radiotest
wifi_provisioning
wifi_zephyr
4 changes: 2 additions & 2 deletions doc/nrf/samples/wifi_provisioning.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _wifi_provisioning_samples:

Wi-Fi: provisioning samples
Wi-Fi: Provisioning samples
###########################

The following samples demonstrate how to provision Wi-Fi® credentials to a Wi-Fi-capable Nordic Semiconductor's device.
Expand All @@ -10,4 +10,4 @@ The following samples demonstrate how to provision Wi-Fi® credentials to a Wi-F
:caption: Subpages
:glob:

../../../samples/wifi/*/*/README
../../../samples/wifi/provisioning/*/README
13 changes: 13 additions & 0 deletions doc/nrf/samples/wifi_radiotest.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _wifi_radiotest_samples:

Wi-Fi: Radio test samples
###########################

The following samples demonstrate how to use the Wi-Fi® radio test commands.

.. toctree::
:maxdepth: 1
:caption: Subpages
:glob:

../../../samples/wifi/radio_test/*/README
2 changes: 1 addition & 1 deletion samples/bluetooth/throughput/src/cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static int default_cmd(const struct shell *shell, size_t argc,
}

if (argc == 2) {
shell_error(shell, "Uknown argument: %s", argv[1]);
shell_error(shell, "Unknown argument: %s", argv[1]);
return -EINVAL;
}

Expand Down
2 changes: 1 addition & 1 deletion samples/cellular/modem_shell/src/link/link_settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ int link_sett_save_defcontauth_prot(int auth_prot)
err = link_shell_pdn_auth_prot_to_pdn_lib_method_map(auth_prot,
&method);
if (err) {
mosh_error("Uknown auth protocol %d", auth_prot);
mosh_error("Unknown auth protocol %d", auth_prot);
return -EINVAL;
}

Expand Down
10 changes: 5 additions & 5 deletions samples/peripheral/radio_test/src/radio_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static int cmd_data_rate_set(const struct shell *shell, size_t argc,
}

if (argc == 2) {
shell_error(shell, "Uknown argument: %s", argv[1]);
shell_error(shell, "Unknown argument: %s", argv[1]);
return -EINVAL;
}

Expand Down Expand Up @@ -418,7 +418,7 @@ static int cmd_output_power_set(const struct shell *shell, size_t argc,
}

if (argc == 2) {
shell_error(shell, "Uknown argument: %s", argv[1]);
shell_error(shell, "Unknown argument: %s", argv[1]);
return -EINVAL;
}

Expand All @@ -439,7 +439,7 @@ static int cmd_transmit_pattern_set(const struct shell *shell, size_t argc,
}

if (argc == 2) {
shell_error(shell, "Uknown argument: %s.", argv[1]);
shell_error(shell, "Unknown argument: %s.", argv[1]);
return -EINVAL;
}

Expand Down Expand Up @@ -1173,7 +1173,7 @@ static int cmd_fem(const struct shell *shell, size_t argc, char **argv)
}

if (argc == 2) {
shell_error(shell, "Uknown argument: %s.", argv[1]);
shell_error(shell, "Unknown argument: %s.", argv[1]);
return -EINVAL;
}

Expand Down Expand Up @@ -1220,7 +1220,7 @@ static int cmd_fem_antenna_select(const struct shell *shell, size_t argc,
}

if (argc == 2) {
shell_error(shell, "Uknown argument: %s.", argv[1]);
shell_error(shell, "Unknown argument: %s.", argv[1]);
return -EINVAL;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
.. _wifi_radio_test:

Wi-Fi: Radio test
#################
Wi-Fi: Radio test (Multi domain)
################################

The Radio test sample supports the Radio test subcommands and subcommands to program the Factory Information Configuration Registers (FICR) fields defined in the nRF7002 one-time programmable (OTP) memory.
The sample can be run on multiple domains, for example, Wi-Fi® only on the application core or Wi-Fi and Bluetooth® combination mode, where Wi-Fi runs on the application core and Bluetooth runs on the network core.

See the subpages for detailed documentation on the sample and its features.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ tests:
sample.nrf7002_eb.thingy53.radio_test:
sysbuild: true
build_only: true
extra_args: radio_test_SHIELD=nrf7002eb
extra_args: multi_domain_SHIELD=nrf7002eb
integration_platforms:
- thingy53/nrf5340/cpuapp
platform_allow: thingy53/nrf5340/cpuapp
Expand All @@ -78,7 +78,7 @@ tests:
build_only: true
extra_args:
- FILE_SUFFIX=wifi_combo
- radio_test_SHIELD="nrf7002eb_interposer_p1;nrf7002eb"
- multi_domain_SHIELD="nrf7002eb_interposer_p1;nrf7002eb"
- SNIPPET=nrf70-wifi
integration_platforms:
- nrf54h20dk/nrf54h20/cpuapp
Expand Down
23 changes: 23 additions & 0 deletions samples/wifi/radio_test/single_domain/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(wifi_ble_radio_test)

target_include_directories(app PRIVATE
inc
)

# Application sources
FILE(GLOB app_sources src/*.c)

# NORDIC SDK APP START
target_sources(app PRIVATE
${app_sources}
)
# NORDIC SDK APP END
27 changes: 27 additions & 0 deletions samples/wifi/radio_test/single_domain/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

mainmenu "Nordic Wi-Fi Bluetooth LE Radio test sample"

config RADIO_TEST_SD_POWER_CONTROL_AUTOMATIC
bool "Automatic power control"
depends on FEM
default y
help
Sets SoC output power and Front-End Module (FEM) gain to achieve TX output power requested
by the user. If the exact value cannot be achieved, power is set to the closest value that does
not exceed the limits. If this option is disabled, the user has to set SoC output power and
FEM gain with separate commands.

config RADIO_TEST_SD_RX_TIMEOUT
int "RX packet reception timeout"
default 10
help
Specifies the time in seconds that the application waits for the first packet to be
received in RX mode when a specified number of packets are set to be received.
If the timeout is reached before the first packet is received, the radio will be disabled.

source "Kconfig.zephyr"
16 changes: 16 additions & 0 deletions samples/wifi/radio_test/single_domain/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.. _wifi_radio_test_sd:

Wi-Fi: Wi-Fi Bluetooth LE Radio test (Single domain)
####################################################

The Wi-Fi Bluetooth LE Radio test sample demonstrates how to use the radio test for both Wi-Fi® and Bluetooth® LE protocols using a single domain image, that is, both running on the same core (application core).
The sample shows how to use the radio test subcommands to configure the parameters and run the radio test.

The Wi-Fi Radio test also supports programming the Factory Information Configuration Registers (FICR) fields defined in the nRF7002 one-time programmable (OTP) memory.

See the below links for detailed documentation on the sample and its features.

* Sample description: :ref:`wifi_radio_sample_desc`
* Peripheral radio test: :ref:`radio_test`
* Radio test subcommands: :ref:`wifi_radio_subcommands`
* FICR programming subcommands: :ref:`wifi_ficr_prog`
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Disable the unsupported driver
CONFIG_NRFX_TIMER0=n

# Enable the necessary drivers
CONFIG_NRFX_TIMER10=y
CONFIG_NRFX_GPPI=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2022 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/* @file
* @brief nRF Wi-Fi radio-test mode shell module
*/

#include <zephyr/kernel.h>
#include <stdio.h>
#include <stdlib.h>
#include <zephyr/shell/shell.h>
#include <zephyr/init.h>
#include <ctype.h>
#include <host_rpu_sys_if.h>
#include <fmac_structs.h>
#include <zephyr/drivers/wifi/nrf_wifi/bus/rpu_hw_if.h>

struct nrf_wifi_ctx_zep_rt {
struct nrf_wifi_fmac_priv *fmac_priv;
struct rpu_conf_params conf_params;
};
52 changes: 52 additions & 0 deletions samples/wifi/radio_test/single_domain/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#
# Copyright (c) 2022 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
CONFIG_WIFI=y
CONFIG_WIFI_NRF70=y
CONFIG_NRF70_RADIO_TEST=y

#CONFIG_INIT_STACKS=y

# Memories
CONFIG_MAIN_STACK_SIZE=5200
CONFIG_SHELL_STACK_SIZE=5200
#64K memory needed for IQ sample captures.
CONFIG_HEAP_MEM_POOL_SIZE=98304
CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y


# Debugging
CONFIG_STACK_SENTINEL=y
CONFIG_DEBUG_COREDUMP=y
CONFIG_DEBUG_COREDUMP_BACKEND_LOGGING=y
CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=y
CONFIG_SHELL_CMDS_RESIZE=n
#CONFIG_DEBUG=y

# Logging
CONFIG_LOG=y
CONFIG_PRINTK=y
CONFIG_SHELL=y
CONFIG_SHELL_GETOPT=y
CONFIG_DEVICE_SHELL=y
CONFIG_POSIX_CLOCK=y
CONFIG_DATE_SHELL=y
CONFIG_LOG_BUFFER_SIZE=4096
CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE=1024

# Peripheral radio test configuration
CONFIG_CONSOLE_HANDLER=y
CONFIG_SHELL=y

CONFIG_DYNAMIC_INTERRUPTS=y

CONFIG_NRFX_TIMER0=y
CONFIG_CLOCK_CONTROL=y

CONFIG_ENTROPY_GENERATOR=y
CONFIG_NRF_SECURITY=y

CONFIG_FEM_AL_LIB=y
CONFIG_PICOLIBC_IO_FLOAT=y
15 changes: 15 additions & 0 deletions samples/wifi/radio_test/single_domain/sample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
sample:
description: Wi-Fi BLE radio test sample single domain
name: Wi-Fi BLE radio test Single Domain
tests:
sample.nrf70.wifi_ble_radio_test_sd:
sysbuild: true
build_only: true
extra_args:
- single_domain_SHIELD="nrf7002eb_interposer_p1;nrf7002eb"
- single_domain_SNIPPET=nrf70-wifi
integration_platforms:
- nrf54l15dk/nrf54l15/cpuapp
platform_allow:
- nrf54l15dk/nrf54l15/cpuapp
tags: ci_build sysbuild ci_samples_wifi
Loading
Loading