nRF5 SDK v17.0.2
Direct Test Mode

The DTM application enables the DTM test functions described in Bluetooth Specification Version 5.2, Vol. 6, Part F.

The purpose of DTM is to test the operation of the radio at the physical level, such as:

Setup

Test procedures are defined in the document "Bluetooth Low Energy RF PHY Test Specification", Document number RF-PHY.TS/p15. Conformance tests are carried out by dedicated test equipment (such as the Anritsu MT8852 or similar) with the nRF5 with the DTM application as the device under test (DUT).

The nRF5 DTM application includes two parts:

The DTM application contains a driver for a 2-wire UART interface, mapping two-octet commands and events as specified by the BLE DTM specification to the DTM - Direct Test Mode library.

DTM_DUT.svg
nRF5 with DTM as a DUT

The implementation is self-contained and requires no BLE protocol stack for its operation. The MPU is initialized in the standard way (files arm_startup_nrf52.s and system_nrf52.c). The DTM library function dtm_init configures all interrupts, timers, and the radio.

main.c may be replaced with other interface implementations, such as an HCI interface, USB, or another interface required by the Upper Tester.

The interface to the Lower Tester uses the antenna connector of the nRF5. While in principle an aerial may be used, conformance tests cover reading the transmission power delivered by the DUT; hence a coax connection between the DUT and the Lower Tester is employed for all conformance testing.

BLE DTM module interface

The DTM - Direct Test Mode function dtm_cmd implements the four commands defined by the BLE standard:

In the dtm_cmd interface, each of the parameters (cmd, freq, length, payload) is a word size value. Note that the currently supported parameter values are limited to those defined for BLE. (HCI allows a greater value range for use with BR/EDR.)

The following DTM events are polled using the dtm_event_get function:

dtm_engine.svg
State machine overview of the DTM

Supported PHYs

The DTM application supports all four PHYs specified in DTM, but not all devices support all the PHYs.

nRF52810 nRF52811 nRF52820 nRF52832 nRF52833 nRF52840
LE 1M Yes Yes Yes Yes Yes Yes
LE 2M Yes Yes Yes Yes Yes Yes
LE Coded; with use S=8 data coding No Yes Yes No Yes Yes
LE Coded; with use S=2 data coding No Yes Yes No Yes Yes

Supported Direction finding method

The DTM application supports the Angle of Arrival (AoA) and Angle of Departure (AoD) Direction Finding modes.

The following table shows support matrix for AoA and AoD for each SoC.

Direction finding types nRF52810 nRF52811 nRF52820 nRF52832 nRF52833 nRF52840
AoA 1 us slot No Yes Yes No Yes No
AoA 2 us slot No Yes Yes No Yes No
AoD No Yes Yes No Yes No

The following antenna switching patterns are possible:

The application supports a maximum of 19 antennas in the direction finding mode. The RADIO can control up to 8 GPIO pins in order to control the external antenna switches used in direction finding.

The antenna is chosen by writing consecutive numbers to SWITCHPATTERN register. This means that the antenna GPIO pins act like 8-bit registers. In other words, for the first antena, the antenna pin 1 is active, for the second antenna, the pin 2 is active, for the third antenna, the pins 1 and 2 are active, and so on.

Vendor Specific packet payload

The BLE 2-wire UART DTM interface standard reserves Packet Type (payload parameter) binary value '11' for a Vendor Specific packet payload. The DTM to Serial adaptation layer maps this to value 0xFFF..FFF in the dtm_cmd interface. The rationale for this mapping is to allow later extensions to a 4-bit Packet Type field, as specified in the HCI interface and in the DTM PDU layout.

The Vendor Specific payload (parameter 4) is interpreted as follows, if parameter 1 (command) is set to Transmitter Test (binary '10') and parameter 4 (payload) to Vendor Specific (binary '11' in the 2wire physical interface, all bits set to 1 in the dtmlib interface):

The DTM to Serial adaptation layer

main.c is an implementation of the UART interface as specified in Volume 6, part F, chapter 3 of the Bluetooth specification.

The default selection of GPIO pins are pin 8 for RX and pin 6 for TX. These defaults are defined in <InstallFolder>\examples\bsp\board.h and can be changed by editing the values of the symbols RX_PIN_NUMBER and TX_PIN_NUMBER.

Running DTM tests

Conformance testing is done using a certified tester. The setup depends on the actual tester, and details about the test operation must be found in the tester documentation. Application note nAN34 describes two alternatives for setting up a production test with DTM: Anritsu MT8852B Bluetooth Test Set, and the nRF8001 Development Kit or the nRF51822 Development Kit together with a computer as the tester.

The BLE DTM UART interface standard specifies:

The default bit rate of the DTM UART driver is 19200 bps, which is supported by most certified testers.


Documentation feedback | Developer Zone | Subscribe | Updated