This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to test direct_test_mode with nrf21540 in NCS1.8?

Hello,

NCS1.8.0   Windows10  X64;

i test   v1.8.0\nrf\samples\bluetooth\direct_test_mode, and i want to use nrf21540 model.

i've set CONFIG_NRF21540_FEM=y  and do Project->Run CMake, but nrf21540 is not enabled.

if i forcibly enable it,

got error "DT_N_NODELABEL_nrf_radio_fem_P_spi_if_IDX_0_PH_BUS_P_label" undeclared here (not in a function)

   

thanks

Best Regards

  • Hi,

    Which board are you building for? If you build for nrf21540dk_nrf52840, CONFIG_NRF21540_FEM will be enabled by default. You do not need to alter the sample in any way.

    The "greyed out" sections in SES are not always correct, and sections which are included may be greyed out.

    To see if CONFIG_NRF21540_FEM is enabled in your build, you can check the build_nrf21540dk_nrf52840/zephyr/config.old file. That file holds the value of your configs.

  • Hello,

    thanks for reply,

    i've choose nrf52840dk_nrf52840, so,it wrong.

    According to your tips,change to nrf21540dk_nrf52840,it ok.

    but i want to use it in nRF5340, no find nrf21540dk_nrf5340_cpuapp.

    if choose nrf5340dk_nrf5340_cpuapp,build error  "error: 'NRF_RADIO' undeclared"

      

    thanks

    Best Regards

  • On the nRF5340, the radio is handled by the network core, so you need to build for nrf5340dk_nrf5340_cpunet.

    There is an .overlay and .conf file for cpunet in the direct_test_mode/boards folder, which will be used automatically.

  • Hello,

    my project use nRF5340+nRF21540,

    and i must use 128MHz, whit codes " nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1);"

    so i must choose nrf5340dk_nrf5340_cpuapp.

    is it means  that i can only use 64MHz(nrf5340dk_nrf5340_cpunet) or give up nRF21540?

      

    thanks

    Best Regards

  • You can have 128MHz on the application core, while using nRF21540, but the radio is handled by the network core. The application core can send hci commands to the network core.

    Maybe you can give me a bit more information about what you are trying to achieve, so I can better understand?

Related