Unable to use the DTM example for nRF5340 DK (PCA10095)

I am trying to use the DTM example for nRF5340 DK (PCA10095). The example is located at "C:\v1.7.0\nrf\samples\bluetooth\direct_test_mode", but I am facing "NRF_RADIO_Type" error along with few more errors with 1.7.0 as well as 1.9.0 SDK. I have attached the error log files' links below.

SDK 1.7.0 error log: https://drive.google.com/file/d/1m75QjX6ug_ym6KEYMkzjd8zMPitysDJz/view?usp=sharing

SDK 1.9.0 error log: https://drive.google.com/file/d/1epy6gnY7Dz73dMOb64afPjl9ZBsMckIp/view?usp=sharing

I have also tried using SDK 1.9.1, however I am unable to open the DTM project in it.

Thanks.

Parents
  • Hi,

    I have tested Direct Test Mode (DTM) sample and did not have any issues with building the sample neither in NCS v1.7.0 nor in v1.9.0.

    Please ensure that the board you choose is nrf5340dk_nrf5340_cpunet as described in  direct test mode.
    Based on the FEM support and hardware support, if you use nrf21540_ek, you should add extra CMAKE argument -DSHIELD=nrf21540_ek when adding build configuration.

    Best regards,
    Dejan

  • Hi dejans, 

    Thanks for the clarification. I am now able to build and download the the sample into the DK. However, I am not able to use the DTM as I am getting the error "Can not communicate with device. Make sure it is not in use by another application and that it has a Direct Test Mode compatible firmware".

    My setup: First chose the nrf5340dk_nrf5340_cpunet and direct_test_mode example, build and load the DTM firmware onto my PCA10095 via USB connector. Next, I select the COM port for my serial connection in nRF connect DTM app. Finally, I press the "Start Test" button at the bottom of the DTM section and then the error comes up.

    Thanks and Regards.

  • Hi,

    Maximum supported value of the radio output power for nRF5340 has been increased from 0 dBm to 3 dBm starting from NCS v1.6.0 as specified in the Changelog
    You could try adding the following lines to your code

    Fullscreen
    1
    2
    NRF_VREQCTRL->VREGRADIO.VREQH = 1;
    while(NRF_VREQCTRL->VREGRADIO.VREQHREADY == 0);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    There is more information about TXPOWER and VREQCTRL in the documentation.

    Best regards,
    Dejan

  • Hi Dejan,

    Adding the lines in before calling dtm_init() in main.c or inside dtm_init() did not help me.

    Regards,

    Shubham

  • Hi,

    It should work when added to the init() function. Could you check again?

    Best regards,
    Dejan

  • Hi,

    I have tried it once again but no luck. Attaching the dtm_init() function code where I have added the lines.

    Thanks

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    int dtm_init(void)
    {
    int err;
    NRF_VREQCTRL->VREGRADIO.VREQH = 1;
    while(NRF_VREQCTRL->VREGRADIO.VREQHREADY == 0);
    err = clock_init();
    if (err) {
    return err;
    }
    err = timer_init();
    if (err) {
    return err;
    }
    err = wait_timer_init();
    if (err) {
    return err;
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi,

    When you set the value of radio output power to 0 dBm, it will be increased by 3 dBm. For setting the radio output power, you can use nrf_radio_txpower_set function from nrfx radio driver.

    Best regards,
    Dejan

Reply Children
No Data