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.

  • Hi,

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

    Thanks

    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;
    	}
    
    #ifdef NRF52840_XXAA
    	/* Enable the timer used by nRF52840 anomaly 172 if running on an
    	 * affected device.
    	 */
    	err = anomaly_timer_init();
    	if (err) {
    		return err;
    	}
    #endif
    
    	err = gppi_init();
    	if (err) {
    		return err;
    	}
    
    	/** Connect radio interrupts. */
    	IRQ_CONNECT(RADIO_IRQn, CONFIG_DTM_RADIO_IRQ_PRIORITY, radio_handler,
    		    NULL, 0);
    	irq_enable(RADIO_IRQn);
    
    	err = radio_init();
    	if (err) {
    		return err;
    	}
    
    	dtm_inst.state = STATE_IDLE;
    	dtm_inst.new_event = false;
    	dtm_inst.packet_len = 0;
    
    	return 0;
    }

  • 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

Related