This section provides instructions on how to set up and use the nRF70 BM driver with west for nRF boards or git submodule for customer boards.
For applications integrating the nRF70 Series BM driver it is recommended to use west and the nRF Connect SDK Toolchain,
for building and programming, when testing and evaluating the BM driver using official Nordic development boards.
-
Toolchain and environment setup:
Install the nRF Command Line tools (for programming and debugging applications on Nordic development boards) downloading them from https://www.nordicsemi.com/Products/Development-tools/nrf-command-line-tools.
Follow the instructions on the official nRF Connect SDK documentation on how to install the required toolchain. https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/installation/install_ncs.html
When using the command line and nRF Util method,
westand all the required tools will be installed. Alternatively,westcan be installed as described in the following step. -
Install West:
Follow the instructions on the official Zephyr Project documentation to install
west: https://docs.zephyrproject.org/latest/guides/west/install.html -
Clone the Repository:
Clone the main repository using
west:west init -m https://github.com/nrfconnect/nrf70-bm cd nrf70-bm west update -
Build the Project:
Use
westto build the project for your specific board and type i.e.,CONFIG_NRF70_BOARD_TYPE_DK(default) orCONFIG_NRF70_BOARD_TYPE_EKwest build -b your_board_name -- -D<BOARD_TYPE>=y
-
Flash the Board:
Flash the firmware onto your nRF board:
west flash
-
Clone the Repository:
Clone the main repository and its submodules:
git clone https://github.com/nrfconnect/nrf70-bm --recurse-submodules
If you have already cloned the repository without submodules, you can initialize and update the submodules with:
git submodule update --init --recursive
-
Build and flashing instructions depend on the third-party board and the build system used. Please use board type as
CONFIG_NRF70_BOARD_TYPE_CUSTOMand also add the TX power ceiling header file for the custom board atnrf70_bm_lib/include, seenrf70_bm_lib/include/nrf70_tx_pwr_ceil_dk.hfor reference.
The source directory structure shall look like this:
.. code-block:: none
nrf70_bm_lib/ # nRF70 BM driver library
sdk_nrfxlib/ # nRF Connect SDK nrfxlib
nrf_wifi/ # nRF70 Wi-Fi firmware patch blobs
nrf_wifi/ # nRF Wi-Fi driver OS agnostic code
samples/ # Sample applications
radio_test_bm/ # Radio test sample application
scan_bm/ # Scan sample application
scan_rt_bm/ # Scan and Radio test combo sample application
nrf70_zephyr_shim/ # Zephyr shim for nRF70, reference for third-party boards
The nRF70 Series BM driver is designed to be portable across different platforms.
The nrf70_zephyr_shim directory contains a reference implementation for Zephyr.
This reference implementation can be used as a guide to port the library to other platforms.
Please refer to nrf70_bm_lib/docs for more information on the BM driver and the porting guide.
The documentation for the nRF70 BM driver is available in the nrf70_bm_lib/docs directory.
To build the documentation in a Linux environment, follow the below steps:
Note: Currently, only Linux platforms are supported.
-
Install python requirements:
Install the required python packages using
pip:pip install -r nrf70_bm_lib/docs/requirements.txt
-
Install doxygen:
Install doxygen using
aptpackage manager (or any other package manager based on your OS):sudo apt install doxygen
-
Build the Documentation:
Build the documentation using the following command:
./build-docs.sh
The generated HTML files will be available in
nrf70_bm_lib/docs/build/html.Open the
index.htmlfile in a browser to view the documentation.
The repository includes the below sample applications for the testing and the evaluation of the nRF70 Bare Metal library:
-
BM radio testsample to perform basic RF testing of the nRF70 Series device, as well as Factory Information Configuration Registers (FICR) programming. -
BM scansample to test Wi-Fi SSID scanning with the nRF70 Series devices. -
BM scan and radio test combosample to demonstrate runtime switching capability between scan and radio test operational modes for the BM library
The samples can be found under the samples/ directory. The samples can be built using west, as explained above.
The repository includes a comprehensive test suite for validating the nRF70 BM driver functionality:
The tests/bustest/ directory contains Ztest-based unit tests for the nRF70 bus library. These tests validate:
- RDSR0 Test (
test_rdsr0): Validates reading of RDSR0 register (0x05) and verifies expected value - RDSR1 Test (
test_rdsr1): Validates reading of RDSR1 register (0x1F) and checks RPU awake status - RDSR2 Tests (
test_rdsr2_*): Comprehensive tests for RDSR2 register (0x2F) functionality:- Pattern tests: Validates writing and reading specific bit patterns (0xAA, 0x54)
- Walking bit tests: Tests individual bit manipulation with walking '1' and walking '0' patterns
- WRSR2 integration: Tests writing to WRSR2 register (0x3F) and reading back via RDSR2
- System Bus Test (
test_sysbus): Validates system bus read operations across multiple addresses - Peripheral Bus Test (
test_peripbus): Tests peripheral bus read/write operations with 24-bit addressing - Data RAM Test (
test_dataram): Memory test for data RAM region
The tests use the following register address macros for maintainability:
#define RDSR0_ADDR 0x05
#define RDSR1_ADDR 0x1F
#define RDSR2_ADDR 0x2F
#define WRSR2_ADDR 0x3FTo run the bustest suite:
west build -b your_board_name tests/bustest
west flashThe tests will execute automatically and report results via the console output.
The bustest suite provides comprehensive coverage of:
- Register read/write operations via QSPI and SPI interfaces
- Bus interface functionality (system and peripheral buses)
- Memory operations and validation
- Error handling and edge cases