nRF5340 how to Direct test mode in NCS2.0

Hello

NCS2.0.2, nRF5340+nRF21540,  vscode

hwo to do Direct test mode with MT8852B? (PS: i konw how to test nRF52840)

i open the demo from:

C:\ncs\v2.0.2\nrf\samples\bluetooth\direct_test_mode

and add code to open 21540 to 20dB like this,

	gpio_pin_configure_dt(&sp_pdn_21540, GPIO_OUTPUT_ACTIVE);
	gpio_pin_set_dt(&sp_pdn_21540,1);		// high
		gpio_pin_configure_dt(&sp_csn_21540, GPIO_OUTPUT_ACTIVE);
		gpio_pin_set_dt(&sp_csn_21540,1);	// high
	gpio_pin_configure_dt(&sp_rxen_21540, GPIO_OUTPUT_ACTIVE);
	gpio_pin_set_dt(&sp_rxen_21540,1);		// high  enabled
		gpio_pin_configure_dt(&sp_mode_21540, GPIO_OUTPUT_ACTIVE);
		gpio_pin_set_dt(&sp_mode_21540,0);	// low  TX_Gain=POUTA(20dB)
	gpio_pin_configure_dt(&sp_antsel_21540, GPIO_OUTPUT_ACTIVE);
	gpio_pin_set_dt(&sp_antsel_21540,0);	// low ANT1
		gpio_pin_configure_dt(&sp_txen_21540, GPIO_OUTPUT_ACTIVE);
		gpio_pin_set_dt(&sp_txen_21540,1);	// high  enabled


	printk("Starting Direct Test Mode example\n");

nRF5340 is two core, is should choose cpuapp or cpunet? if choose cpuapp, the net core no hex.

   

build cpuapp or cpuapp_ns

  dtm.c:2118:24: error: 'RADIO_IRQn' undeclared

   

update SDK to NCS2.3.0 build error:

(PS:cpoy new project C:\ncs\v2.3.0\nrf\samples\bluetooth\direct_test_mode,   don't chang any code)

build cpuapp or cpuapp_ns

dtm.c:2185:35: error: 'NRF_RADIO' undeclared

build cpunet

main.c:73: undefined reference to `__device_dts_ord_66'

   

Best regards

Related