RF Test on custom board (nrf5340 + nrf21540)

Hello,

I create a custom board based on nRF5340 with a FEM nRF21540 and I would like to test radio part with some fixed frequency test.

It seems that SDK (nrf connect 2.4) provides a sample for RF test (Direct Test Mode).

After adding my board in the "Direct Test Mode" project, I meet some build error:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Executing task: nRF Connect: Generate config erl_nrf5340_cpunet for /home/bgorostidi/Workspace/Projects/Iot/nrf53_test/direct_test_mode
Building direct_test_mode
/bin/sh -c west build --build-dir /home/bgorostidi/Workspace/Projects/Iot/nrf53_test/direct_test_mode/build_erl /home/bgorostidi/Workspace/Projects/Iot/nrf53_test/direct_test_mode --pristine --board erl_nrf5340_cpunet --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DBOARD_ROOT:STRING="/home/bgorostidi/Workspace/Projects/Iot/nrf53_test/direct_test_mode" -DCONFIG_DTM_USB="y"
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /home/bgorostidi/Workspace/Projects/Iot/nrf53_test/direct_test_mode
-- CMake version: 3.20.5
-- Found Python3: /home/bgorostidi/Workspace/Toolchains/nrfConnect_SDK/toolchains/1f9b40e71a/usr/local/bin/python3.8 (found suitable exact version "3.8.2") found components: Interpreter
-- Cache files will be written to: /home/bgorostidi/.cache/zephyr
-- Zephyr version: 3.3.99 (/home/bgorostidi/Workspace/Toolchains/nrfConnect_SDK/v2.4.0/zephyr)
-- Found west (found suitable version "1.0.0", minimum required is "0.7.1")
-- Board: erl_nrf5340_cpunet
-- Found host-tools: zephyr 0.16.0 (/home/bgorostidi/Workspace/Toolchains/nrfConnect_SDK/toolchains/1f9b40e71a/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.0 (/home/bgorostidi/Workspace/Toolchains/nrfConnect_SDK/toolchains/1f9b40e71a/opt/zephyr-sdk)
-- Found Dtc: /home/bgorostidi/Workspace/Toolchains/nrfConnect_SDK/toolchains/1f9b40e71a/usr/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found BOARD.dts: /home/bgorostidi/Workspace/Projects/Iot/nrf53_test/direct_test_mode/boards/arm/erl_nrf5340/erl_nrf5340_cpunet.dts
-- Found devicetree overlay: /home/bgorostidi/Workspace/Projects/Iot/nrf53_test/direct_test_mode/boards/erl_nrf5340_cpunet.overlay
-- Generated zephyr.dts: /home/bgorostidi/Workspace/Projects/Iot/nrf53_test/direct_test_mode/build_erl/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /home/bgorostidi/Workspace/Projects/Iot/nrf53_test/direct_test_mode/build_erl/zephyr/include/generated/devicetree_generated.h
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

My custom board has an UART0  (only TX) for debug and USB capability.

Best regards.

8132.direct_test_mode.zip

  • Hi,

    It looks like your custom board does not define the DOMAIN_CPUAPP_BOARD symbol. Please try adding it to the Kconfig file in your board directory like how we've done it for the nRF5340DK here: https://github.com/nrfconnect/sdk-zephyr/blob/c7094146b5b47fd4da05ed773e0128e2e6a634e1/boards/arm/nrf5340dk_nrf5340/Kconfig#L51. Note that the string should reflect the name of your board. 

    Best regards,

    Vidar

  • Hi,

    I've double checked the Kconfig and the DOMAIN_CPUAPP_BOARD is well defined with the board name.

  • Hi,

    Please check what the DOMAIN_CPUAPP_BOARD symbol is set to in your .config output file.

  • Actualy, DOMAIN_CPUAPP_BOARD symbol is not taken into account in the .config file.

    Kconfig content:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    # ERL board configuration
    if BOARD_ERL_NRF5340_CPUAPP || BOARD_ERL_NRF5340_CPUAPP_NS
    config BOARD_ENABLE_DCDC_APP
    bool "Application MCU DCDC converter"
    select SOC_DCDC_NRF53X_APP
    default y
    config BOARD_ENABLE_DCDC_NET
    bool "Network MCU DCDC converter"
    select SOC_DCDC_NRF53X_NET
    default y
    config BOARD_ENABLE_DCDC_HV
    bool "High Voltage DCDC converter"
    select SOC_DCDC_NRF53X_HV
    default y
    config BOARD_ENABLE_CPUNET
    bool "NRF53 Network MCU"
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Can you upload your .config file here?

1 2 3