This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf5340 radio test

I'm debugging radio test sample and I'm having some problems.
The first step is to compile NRF / samples / peripheral / radio with SES_ Zephyr.hex in test project.
Second, use west to download zephyr. Hex to the network core.
In the third step, use SES to open NRF / samples / nrf5340 / empty_ app_ Core project, compile and download to the application core.
The fourth step is to open the serial port tool and prepare to send debugging commands.

The serial port returns the following.

Non-secure callable region 0 placed in flash region 1 with size 32.

SRAM region		Domain		Permissions
00 03 0x00000 0x08000 	Secure		rwxl
04 63 0x08000 0x80000 	Non-Secure	rwxl

Peripheral		Domain		Status
00 NRF_P0               Non-Secure	OK
01 NRF_CLOCK            Non-Secure	OK
02 NRF_RTC0             Non-Secure	OK
03 NRF_RTC1             Non-Secure	OK
04 NRF_NFCT             Non-Secure	OK
05 NRF_NVMC             Non-Secure	OK
06 NRF_UARTE1           Non-Secure	OK
07 NRF_UARTE2           Secure		SKIP
08 NRF_TWIM2            Non-Secure	OK
09 NRF_SPIM3            Non-Secure	OK
10 NRF_TIMER0           Non-Secure	OK
11 NRF_TIMER1           Non-Secure	OK
12 NRF_TIMER2           Non-Secure	OK
13 NRF_SAADC            Non-Secure	OK
14 NRF_PWM0             Non-Secure	OK
15 NRF_PWM1             Non-Secure	OK
16 NRF_PWM2             Non-Secure	OK
17 NRF_PWM3             Non-Secure	OK
18 NRF_IPC              Non-Secure	OK
19 NRF_VMC              Non-Secure	OK
20 NRF_FPU              Non-Secure	OK
21 NRF_EGU1             Non-Secure	OK
22 NRF_EGU2             Non-Secure	OK
23 NRF_DPPIC            Non-Secure	OK
24 NRF_REGULATORS       Non-Secure	OK
25 NRF_DCNF             Secure		SKIP
26 NRF_CTRLAP           Secure		SKIP
27 NRF_SPIM4            Non-Secure	OK
28 NRF_WDT0             Non-Secure	OK
29 NRF_WDT1             Non-Secure	OK
30 NRF_COMP             Non-Secure	OK
31 NRF_LPCOMP           Non-Secure	OK
32 NRF_PDM0             Non-Secure	OK
33 NRF_I2S0             Non-Secure	OK
34 NRF_QSPI             Non-Secure	OK
35 NRF_NFCT             Non-Secure	OK
36 NRF_MUTEX            Non-Secure	OK
37 NRF_QDEC0            Non-Secure	OK
38 NRF_QDEC1            Non-Secure	OK
39 NRF_USBD             Non-Secure	OK
40 NRF_USBREGULATOR     Non-Secure	OK
41 NRF_P1               Non-Secure	OK
42 NRF_OSCILLATORS      Non-Secure	OK
43 NRF_RESET            Non-Secure	OK
44 NRF_GPIOTE1          Non-Secure	OK

SPM: NS image at 0x8000
SPM: NS MSP at 0x20008498
SPM: NS reset vector at 0x83f1

But I didn't respond to my command. What did I do wrong?

Parents Reply Children
  • mingjkl said:
    Do these three com correspond to application core and network core respectively?

     Yes, from this link, we have the following:

    When connected to the computer, the nRF5340 DK emulates three virtual COM ports. In the default configuration:

    • Logging output from the application core sample is available on the third (last) COM port.

    • Logging output from the network core (if available) is routed to the first COM port.

    • The second (middle) COM port is silent.

  • Thank you for your answer. I want to ask another question about radio test. I see that in the project of radio test, in the main (void) of main.c, the first execution is printk, and then clock_ Init (), but I can't see the initialization code of radio and UART. How did UART and radio start to work.

    /*
     * Copyright (c) 2020 Nordic Semiconductor ASA
     *
     * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
     */
    
    #include <sys/printk.h>
    #include <drivers/clock_control.h>
    #include <drivers/clock_control/nrf_clock_control.h>
    
    static void clock_init(void)
    {
    	int err;
    	int res;
    	struct onoff_manager *clk_mgr;
    	struct onoff_client clk_cli;
    
    	clk_mgr = z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_HF);
    	if (!clk_mgr) {
    		printk("Unable to get the Clock manager\n");
    		return;
    	}
    
    	sys_notify_init_spinwait(&clk_cli.notify);
    
    	err = onoff_request(clk_mgr, &clk_cli);
    	if (err < 0) {
    		printk("Clock request failed: %d\n", err);
    		return;
    	}
    
    	do {
    		err = sys_notify_fetch_result(&clk_cli.notify, &res);
    		if (!err && res) {
    			printk("Clock could not be started: %d\n", res);
    			return;
    		}
    	} while (err);
    
    	printk("Clock has started\n");
    }
    
    void main(void)
    {
    	printk("Starting Radio Test example\n");
    
    	clock_init();
    }

Related