Skip to content

Commit 17ab2bc

Browse files
committed
samples: port radio_test to ncs-bm
changed the implementation of the sample to the subsystems and modules available in sdk-nrf-bm: - use shell_print instead of printk everywhere - use sample-specific clock_init() function - cleaned-up prj.conf, disabled SD explicitly - updated readme Also, updated copyright year Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
1 parent 5c82839 commit 17ab2bc

9 files changed

Lines changed: 217 additions & 285 deletions

File tree

doc/nrf-bm/links.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
.. _`Configuring Kconfig`: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/config_and_build/kconfig/index.html
100100
.. _`Power Profiler app`: https://docs.nordicsemi.com/bundle/swtools_docs/page/app/pc-nrfconnect-ppk/index.html
101101
.. _`Power Profiler Kit II (PPK2)`: https://docs.nordicsemi.com/bundle/ug_ppk2/page/UG/ppk/PPK_user_guide_Intro.html
102+
.. _`RSSI Viewer app`: https://docs.nordicsemi.com/bundle/swtools_docs/page/app/pc-nrfconnect-rssi/index.html
102103
.. _`nRF Connect for Mobile`: https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Connect-for-mobile
103104

104105
.. ### DFU
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2020 Nordic Semiconductor
2+
# Copyright (c) 2026 Nordic Semiconductor
33
#
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
@@ -9,11 +9,8 @@ cmake_minimum_required(VERSION 3.20.0)
99
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
1010
project(peripheral_radio_test)
1111

12-
# Application sources
1312
FILE(GLOB app_sources src/*.c)
1413

15-
# NORDIC SDK APP START
1614
target_sources(app PRIVATE
1715
${app_sources}
1816
)
19-
# NORDIC SDK APP END

samples/peripherals/radio_test/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#
2-
# Copyright (c) 2020 Nordic Semiconductor
2+
# Copyright (c) 2026 Nordic Semiconductor
33
#
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66

77
mainmenu "Nordic Radio test sample"
88

9-
config RADIO_TEST_RX_TIMEOUT
9+
config SAMPLE_RADIO_TEST_RX_TIMEOUT
1010
int "RX packet reception timeout"
1111
default 10
1212
help

samples/peripherals/radio_test/README.rst

Lines changed: 40 additions & 172 deletions
Original file line numberDiff line numberDiff line change
@@ -25,121 +25,23 @@ The sample supports the following development kits:
2525

2626
The following board variants do **not** have DFU capabilities:
2727

28-
.. list-table::
29-
:header-rows: 1
30-
31-
* - Hardware platform
32-
- PCA
33-
- SoftDevice
34-
- Board target
35-
* - `nRF54L15 DK`_
36-
- PCA10156
37-
- S115
38-
- bm_nrf54l15dk/nrf54l15/cpuapp/s115_softdevice
39-
* - `nRF54L15 DK`_ (emulating nRF54L10)
40-
- PCA10156
41-
- S115
42-
- bm_nrf54l15dk/nrf54l10/cpuapp/s115_softdevice
43-
* - `nRF54L15 DK`_ (emulating nRF54L05)
44-
- PCA10156
45-
- S115
46-
- bm_nrf54l15dk/nrf54l05/cpuapp/s115_softdevice
47-
* - `nRF54LM20 DK`_
48-
- PCA10184
49-
- S115
50-
- bm_nrf54lm20dk/nrf54lm20a/cpuapp/s115_softdevice
51-
* - nRF54LS05 DK
52-
- PCA10214
53-
- S115
54-
- bm_nrf54ls05dk/nrf54ls05b/cpuapp/s115_softdevice
55-
* - `nRF54LV10 DK`_
56-
- PCA10188
57-
- S115
58-
- bm_nrf54lv10dk/nrf54lv10/cpuapp/s115_softdevice
59-
* - `nRF54L15 DK`_
60-
- PCA10156
61-
- S145
62-
- bm_nrf54l15dk/nrf54l15/cpuapp/s145_softdevice
63-
* - `nRF54L15 DK`_ (emulating nRF54L10)
64-
- PCA10156
65-
- S145
66-
- bm_nrf54l15dk/nrf54l10/cpuapp/s145_softdevice
67-
* - `nRF54L15 DK`_ (emulating nRF54L05)
68-
- PCA10156
69-
- S145
70-
- bm_nrf54l15dk/nrf54l05/cpuapp/s145_softdevice
71-
* - `nRF54LM20 DK`_
72-
- PCA10184
73-
- S145
74-
- bm_nrf54lm20dk/nrf54lm20a/cpuapp/s145_softdevice
75-
* - nRF54LS05 DK
76-
- PCA10214
77-
- S145
78-
- bm_nrf54ls05dk/nrf54ls05b/cpuapp/s145_softdevice
79-
* - `nRF54LV10 DK`_
80-
- PCA10188
81-
- S145
82-
- bm_nrf54lv10dk/nrf54lv10/cpuapp/s145_softdevice
28+
.. include:: /includes/supported_boards_all_non-mcuboot_variants_s115.txt
29+
30+
.. include:: /includes/supported_boards_all_non-mcuboot_variants_s145.txt
8331

8432
.. group-tab:: MCUboot board variants
8533

8634
The following board variants have DFU capabilities:
8735

88-
.. list-table::
89-
:header-rows: 1
90-
91-
* - Hardware platform
92-
- PCA
93-
- SoftDevice
94-
- Board target
95-
* - `nRF54L15 DK`_
96-
- PCA10156
97-
- S115
98-
- bm_nrf54l15dk/nrf54l15/cpuapp/s115_softdevice/mcuboot
99-
* - `nRF54L15 DK`_ (emulating nRF54L10)
100-
- PCA10156
101-
- S115
102-
- bm_nrf54l15dk/nrf54l10/cpuapp/s115_softdevice/mcuboot
103-
* - `nRF54L15 DK`_ (emulating nRF54L05)
104-
- PCA10156
105-
- S115
106-
- bm_nrf54l15dk/nrf54l05/cpuapp/s115_softdevice/mcuboot
107-
* - `nRF54LM20 DK`_
108-
- PCA10184
109-
- S115
110-
- bm_nrf54lm20dk/nrf54lm20a/cpuapp/s115_softdevice/mcuboot
111-
* - `nRF54LV10 DK`_
112-
- PCA10188
113-
- S115
114-
- bm_nrf54lv10dk/nrf54lv10/cpuapp/s115_softdevice/mcuboot
115-
* - `nRF54L15 DK`_
116-
- PCA10156
117-
- S145
118-
- bm_nrf54l15dk/nrf54l15/cpuapp/s145_softdevice/mcuboot
119-
* - `nRF54L15 DK`_ (emulating nRF54L10)
120-
- PCA10156
121-
- S145
122-
- bm_nrf54l15dk/nrf54l10/cpuapp/s145_softdevice/mcuboot
123-
* - `nRF54L15 DK`_ (emulating nRF54L05)
124-
- PCA10156
125-
- S145
126-
- bm_nrf54l15dk/nrf54l05/cpuapp/s145_softdevice/mcuboot
127-
* - `nRF54LM20 DK`_
128-
- PCA10184
129-
- S145
130-
- bm_nrf54lm20dk/nrf54lm20a/cpuapp/s145_softdevice/mcuboot
131-
* - `nRF54LV10 DK`_
132-
- PCA10188
133-
- S145
134-
- bm_nrf54lv10dk/nrf54lv10/cpuapp/s145_softdevice/mcuboot
36+
.. include:: /includes/supported_boards_all_mcuboot_variants_s115.txt
37+
38+
.. include:: /includes/supported_boards_all_mcuboot_variants_s145.txt
13539

13640

13741
The sample also requires one of the following testing devices:
13842

13943
* Another development kit with the same sample.
140-
See :ref:`radio_test_testing_board`.
14144
* Another development kit connected to a PC with the `RSSI Viewer app`_ (available in the `nRF Connect for Desktop`_).
142-
See :ref:`radio_test_testing_rssi`.
14345

14446
.. note::
14547
You can perform the radio test also using a spectrum analyzer.
@@ -149,7 +51,7 @@ Overview
14951
********
15052

15153
To run the tests, connect to the development kit through the serial port and send shell commands.
152-
Zephyr's :ref:`zephyr:shell_api` module is used to handle the commands.
54+
The shell subsystem is used to handle the commands.
15355
At any time during the tests, you can dynamically set the radio parameters, such as output power, bit rate, and channel.
15456
In sweep mode, you can set the time for which the radio scans each channel from one millisecond to 99 milliseconds, in steps of one millisecond.
15557
The sample also allows you to send a data pattern to another development kit.
@@ -162,11 +64,11 @@ See :ref:`radio_test_ui` for a list of available commands.
16264
For the IEEE 802.15.4 mode, the start channel and the end channel must be within the channel range of 11 to 26.
16365
Use the ``start_channel`` and ``end_channel`` commands to control this setting.
16466

165-
16667
.. _radio_test_ui:
16768

16869
User interface
16970
**************
71+
17072
.. list-table:: Main shell commands (in alphabetical order)
17173
:header-rows: 1
17274

@@ -233,71 +135,37 @@ For details on how to create, configure, and program a sample, see :ref:`getting
233135
Testing
234136
=======
235137

236-
After programming the sample to your development kit, complete the following steps to test it in one of the following two ways:
237-
238-
.. _radio_test_testing_board:
239-
240-
Testing with another development kit
241-
------------------------------------
242-
243-
Complete the following steps:
244-
245-
1. Connect both development kits to the computer using a USB cable.
246-
The kits are assigned serial ports.
247-
|serial_port_number_list|
248-
#. |connect_terminal_both_ANSI|
249-
#. Run the following commands on one of the kits:
250-
251-
a. Set the data rate with the ``data_rate`` command to ``ble_2Mbit``.
252-
#. Set the transmission pattern with the ``transmit_pattern`` command to ``pattern_11110000``.
253-
#. Set the radio channel with the ``start_channel`` command to 40.
254-
255-
#. Repeat all steps for the second kit.
256-
#. On both kits, run the ``parameters_print`` command to confirm that the radio configuration is the same on both kits.
257-
#. Set one kit in the Modulated TX Carrier mode using the ``start_tx_modulated_carrier`` command.
258-
#. Set the other kit in the RX Carrier mode using the ``start_rx`` command.
259-
#. Print the received data with the ``print_rx`` command and confirm that they match the transmission pattern (0xF0).
260-
261-
.. _radio_test_testing_rssi:
262-
263-
Testing with the RSSI Viewer app
264-
--------------------------------
265-
266-
Complete the following steps:
138+
After programming the sample to your development kit, complete the following steps to test it:
267139

268-
1. Connect the kit to the computer using a USB cable.
269-
The kit is assigned a COM port (Windows) or ttyACM device (Linux), which is visible in the Device Manager.
270-
#. |connect_terminal_ANSI|
271-
#. Set the start channel with the ``start_channel`` command to 20.
272-
#. Set the end channel with the ``end_channel`` command to 60.
273-
#. Set the time on channel with the ``time_on_channel`` command to 50 ms.
274-
#. Set the kit in the TX sweep mode using the ``start_tx_sweep`` command.
275-
#. Start the `RSSI Viewer app`_ and select the kit to communicate with.
276-
#. On the application chart, observe the TX sweep in the form of a wave that starts at 2420 MHz frequency and ends with 2480 MHz.
277-
278-
Dependencies
279-
************
280-
281-
This sample uses the following |NCS| libraries:
282-
283-
* :ref:`shell_ipc_readme`
284-
285-
This sample has the following nrfx dependencies:
286-
287-
* :file:`nrfx/drivers/include/nrfx_timer.h`
288-
* :file:`nrfx/hal/nrf_power.h`
289-
* :file:`nrfx/hal/nrf_radio.h`
290-
291-
In addition, it uses the following Zephyr libraries:
292-
293-
* :ref:`zephyr:device_model_api`:
294-
295-
* :file:`drivers/clock_control.h`
296-
297-
* :ref:`zephyr:kernel_api`:
298-
299-
* :file:`include/init.h`
300-
301-
* :ref:`zephyr:shell_api`:
140+
.. tabs::
302141

303-
* :file:`include/shell/shell.h`
142+
.. group-tab:: Testing with another development kit
143+
144+
Complete the following steps:
145+
1. Connect both development kits to the computer using a USB cable.
146+
The kits are assigned COM ports (Windows) or ttyACM devices (Linux), which are visible in the Device Manager.
147+
#. Connect to both kits with a terminal emulator that supports VT100/ANSI escape characters (for example, the `Serial Terminal app`_).
148+
#. Run the following commands on one of the kits:
149+
150+
a. Set the data rate with the ``data_rate`` command to ``ble_2Mbit``.
151+
#. Set the transmission pattern with the ``transmit_pattern`` command to ``pattern_11110000``.
152+
#. Set the radio channel with the ``start_channel`` command to 40.
153+
154+
#. Repeat all steps for the second kit.
155+
#. On both kits, run the ``parameters_print`` command to confirm that the radio configuration is the same on both kits.
156+
#. Set one kit in the Modulated TX Carrier mode using the ``start_tx_modulated_carrier`` command.
157+
#. Set the other kit in the RX Carrier mode using the ``start_rx`` command.
158+
#. Print the received data with the ``print_rx`` command and confirm that they match the transmission pattern (0xF0).
159+
160+
.. group-tab:: Testing with the RSSI Viewer app
161+
162+
Complete the following steps:
163+
1. Connect the kit to the computer using a USB cable.
164+
The kit is assigned a COM port (Windows) or ttyACM device (Linux), which is visible in the Device Manager.
165+
#. Open a serial port connection to the kit using a terminal emulator that supports VT100/ANSI escape characters (for example, the `Serial Terminal app`_).
166+
#. Set the start channel with the ``start_channel`` command to 20.
167+
#. Set the end channel with the ``end_channel`` command to 60.
168+
#. Set the time on channel with the ``time_on_channel`` command to 50 ms.
169+
#. Set the kit in the TX sweep mode using the ``start_tx_sweep`` command.
170+
#. Start the `RSSI Viewer app`_ and select the kit to communicate with.
171+
#. On the application chart, observe the TX sweep in the form of a wave that starts at 2420 MHz frequency and ends with 2480 MHz.
Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
11
#
2-
# Copyright (c) 2020 Nordic Semiconductor
2+
# Copyright (c) 2026 Nordic Semiconductor
33
#
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66

7-
CONFIG_CONSOLE_HANDLER=y
7+
# Logging
8+
CONFIG_LOG=y
9+
CONFIG_LOG_BACKEND_BM_UARTE=y
10+
11+
# Shell
812
CONFIG_SHELL=y
13+
CONFIG_SHELL_BACKEND_BM_UARTE=y
914

10-
CONFIG_DYNAMIC_INTERRUPTS=y
15+
# Optional shell features
16+
CONFIG_SHELL_HELP=y
17+
CONFIG_SHELL_TAB=y
18+
CONFIG_SHELL_TAB_AUTOCOMPLETION=y
19+
CONFIG_SHELL_HISTORY=y
1120

21+
# HW used by radio_test
1222
CONFIG_NRFX_TIMER=y
1323
CONFIG_NRFX_GPPI=y
1424

15-
CONFIG_ENTROPY_GENERATOR=y
16-
CONFIG_NRF_SECURITY=y
25+
# Use fake PRNG to reduce HW dependencies
26+
CONFIG_TEST_RANDOM_GENERATOR=y
1727

18-
CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE=1024
28+
# Disable SoftDevice.
29+
# The radio_test sample needs to control radio and other relevant periperhals on its own.
30+
CONFIG_SOFTDEVICE=n

0 commit comments

Comments
 (0)