Skip to content

Commit

Permalink
samples: wifi: radio_test: Add a single domain combo radio test
Browse files Browse the repository at this point in the history
With the introduction of 54L15 SoC where the complete BLE stack runs on
the CPUAPP itself, reorg the radio test directories based on domains.
Single domain radio test is primarily for 54L15 (and other similar
SoCs) which basically combines Wi-Fi and Peripheral radio test samples
in to one.

Signed-off-by: Chaitanya Tata <[email protected]>
  • Loading branch information
krish2718 committed Dec 2, 2024
1 parent ec4d5bf commit 90a3f4b
Show file tree
Hide file tree
Showing 33 changed files with 7,627 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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) 2022 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) 2020 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

mainmenu "Nordic Wi-Fi BLE Radio test sample"

config RADIO_TEST_POWER_CONTROL_AUTOMATIC
bool "Automatic power control"
depends on FEM
default y
help
Set SoC output power and front-end module gain to achieve Tx output power requested
by user. If the exact value cannot be achieved, power is set to closest value which does
not exceed the limits. If this option is disabled, user has to set SoC output power and
fem gain with separate commands.

config RADIO_TEST_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"
20 changes: 20 additions & 0 deletions samples/wifi/radio_test/single_domain/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. _wifi_radio_test:

Wi-Fi BLE Radio Test Sample
###########################

The Wi-Fi BLE Radio Test sample demonstrates how to use the radio test for both Wi-Fi and BLE protocols using a single domain image i.e., both running on the same core.
The sample demonstrates how to use the radio test subcommands to configure the radio test 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 subpages for detailed documentation on the sample and its features.

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

sample_description.rst
peripheral_radio_test.rst
radio_test_subcommands.rst
ficr.rst
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,12 @@
#
# Copyright (c) 2023 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
104 changes: 104 additions & 0 deletions samples/wifi/radio_test/single_domain/ficr.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
.. _wifi_ficr_prog:

FICR programming subcommands
############################

.. contents::
:local:
:depth: 2

``wifi_radio_ficr_prog`` is the Wi-Fi® radio FICR programming command and it supports the following subcommands.

.. _wifi_radio_ficr_prog_subcmds:

Wi-Fi radio FICR subcommands
****************************

.. list-table:: Wi-Fi radio FICR subcommands
:widths: 15 15 10 30 70
:header-rows: 1

* - Subcommand
- Register
- Offset
- Argument(s)
- Description
* - otp_get_status
- N/A
- N/A
- N/A
- Reads out the OTP status of user region and status of each field (programmed or not).
* - otp_read_params
- N/A
- N/A
- N/A
- Reads out all the OTP parameters (excluding QSPI_KEY which cannot be read).
* - otp_read_retrim_version
- PRODRETEST.PROGVERSION
- N/A
- N/A
- Reads out program version of Retrim parameters.
* - otp_read_retrim_params
- PRODRETEST.TRIM[n]
- N/A
- N/A
- Reads out all the Retrim parameters.
* - otp_write_params
- REGION_PROTECT
- 0x100
- arg
- | arg = 0x50FA50FA : Enable R/W permission
| arg = 0x00000000 : Lock Region from Writing
| arg = Others : Invalid
| All four REGION_PROTECT registers are written with this 32-bit argument.
* - otp_write_params
- QSPI_KEY
- 0x110
- arg1 arg2 arg3 arg4
- | All four key arguments are 32-bit values forming the required 128-bit (Q)SPI key for encryption.
| For example, if QSPI key is "112233445566778899aabbccddeeff00" then arg1=0x44332211 arg2=0x88776655 arg3=0xccbbaa99 arg4=0x00ffeedd
* - otp_write_params
- MAC_ADDRESS0
- 0x120
- arg1 arg2
- If MAC address is AA:BB:CC:DD:EE:FF, then arg1=0xDDCCBBAA and arg2=0xFFEE.
* - otp_write_params
- MAC_ADDRESS1
- 0x128
- arg1 arg2
- If MAC address is AA:BB:CC:DD:EE:FF, then arg1=0xDDCCBBAA and arg2=0xFFEE.
* - otp_write_params
- CALIB_XO
- 0x130
- arg
- arg is 7-bit unsigned XO value. Bits [31:7] unused. Adjusts capacitor bank, 0 : Lowest capacitance (Highest frequency), 127 : Highest capacitance (Lowest frequency).
* - otp_write_params
- REGION_DEFAULTS
- 0x154
- arg
- | Register default enable control.
| arg is 32-bit value where a specific bit is set to ``0`` implies that the corresponding OTP field is programmed. The following list shows the bit and field mapping:
|
| bit 0 : QSPI_KEY
| bit 1 : MAC0 Address
| bit 2 : MAC1 Address
| bit 3 : CALIB_XO
| bit 4 : Reserved
| bit 5 : Reserved
| bit 6 : Reserved
| bit 7 : Reserved
| bit 8 : Reserved
| bit 9 : Reserved
| bit 10 : Reserved
| bit 11 : Reserved
| bit 12-31 : Reserved
* - otp_write_retrim_version
- PRODRETEST.PROGVERSION
- N/A
- arg
- arg is 32-bit data.
* - otp_write_retrim_params
- PRODRETEST.TRIM[n]
- index between (0-14)
- arg
- arg is 32-bit data. When index = 5, PRODRETEST.TRIM[5] is written with 32-bit argument.
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 "rpu_hw_if.h"

struct nrf_wifi_ctx_zep_rt {
struct nrf_wifi_fmac_priv *fmac_priv;
struct rpu_conf_params conf_params;
};
Loading

0 comments on commit 90a3f4b

Please sign in to comment.