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

Parents Reply Children
  • Hi again, turns out this is pretty simple. You just need to add the nrf21540 evaluation kit as a SHIELD when building. For a multi-image build that builds hci_rpmsg for the network core, you would use:

    west build -b nrf5340dk_nrf5340_cpuapp -- -D SHIELD=nrf21540_ek -D hci_rpmsg_SHIELD=nrf21540_ek

    No other changes are needed. If you build the images for the cores separately, this needs to be done for both images.

  • Hi,

    thanks for reply,

    VS Code,error

      

    thanks

    Best Regards

  • The direct_test_mode sample uses the radio and can therefore only be built for cpunet. If you want to use the direct_test_mode sample, while having access to the 128Mhz clock, you need something like a firmware on the application core which makes use of the 128Mhz clock and communicates with a modified direct_test_mode sample on the network core.

    That would just be for direct_test_mode testing. For the real project, you would probably just write a program for the application core which does the audio encode, and hci_rpmsg or another protocol sample on the network core.

Related