Skip to content

Commit 4e69fd5

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 4e69fd5

9 files changed

Lines changed: 210 additions & 273 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

samples/peripherals/radio_test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
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
#

samples/peripherals/radio_test/Kconfig

Lines changed: 1 addition & 1 deletion
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
#

samples/peripherals/radio_test/README.rst

Lines changed: 34 additions & 164 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+
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.
@@ -233,71 +135,39 @@ 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:
138+
After programming the sample to your development kit, complete the following steps to test it:
262139

263-
Testing with the RSSI Viewer app
264-
--------------------------------
265-
266-
Complete the following steps:
267-
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:
140+
.. tabs::
286141

287-
* :file:`nrfx/drivers/include/nrfx_timer.h`
288-
* :file:`nrfx/hal/nrf_power.h`
289-
* :file:`nrfx/hal/nrf_radio.h`
142+
.. group-tab:: Testing with another development kit
290143

291-
In addition, it uses the following Zephyr libraries:
144+
Complete the following steps:
292145

293-
* :ref:`zephyr:device_model_api`:
146+
1. Connect both development kits to the computer using a USB cable.
147+
The kits are assigned COM ports (Windows) or ttyACM devices (Linux), which are visible in the Device Manager.
148+
#. Connect to both kits with a terminal emulator that supports VT100/ANSI escape characters (for example, the `Serial Terminal app`_).
149+
#. Run the following commands on one of the kits:
294150

295-
* :file:`drivers/clock_control.h`
151+
a. Set the data rate with the ``data_rate`` command to ``ble_2Mbit``.
152+
#. Set the transmission pattern with the ``transmit_pattern`` command to ``pattern_11110000``.
153+
#. Set the radio channel with the ``start_channel`` command to 40.
296154

297-
* :ref:`zephyr:kernel_api`:
155+
#. Repeat all steps for the second kit.
156+
#. On both kits, run the ``parameters_print`` command to confirm that the radio configuration is the same on both kits.
157+
#. Set one kit in the Modulated TX Carrier mode using the ``start_tx_modulated_carrier`` command.
158+
#. Set the other kit in the RX Carrier mode using the ``start_rx`` command.
159+
#. Print the received data with the ``print_rx`` command and confirm that they match the transmission pattern (0xF0).
298160

299-
* :file:`include/init.h`
161+
.. group-tab:: Testing with the RSSI Viewer app
300162

301-
* :ref:`zephyr:shell_api`:
163+
Complete the following steps:
302164

303-
* :file:`include/shell/shell.h`
165+
1. Connect the kit to the computer using a USB cable.
166+
The kit is assigned a COM port (Windows) or ttyACM device (Linux), which is visible in the Device Manager.
167+
#. Open a serial port connection to the kit using a terminal emulator that supports VT100/ANSI escape characters (for example, the `Serial Terminal app`_).
168+
#. Set the start channel with the ``start_channel`` command to 20.
169+
#. Set the end channel with the ``end_channel`` command to 60.
170+
#. Set the time on channel with the ``time_on_channel`` command to 50 ms.
171+
#. Set the kit in the TX sweep mode using the ``start_tx_sweep`` command.
172+
#. Start the `RSSI Viewer app`_ and select the kit to communicate with.
173+
#. 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 controlr radio and other relevant periperhals on its own.
30+
CONFIG_SOFTDEVICE=n

0 commit comments

Comments
 (0)