The radio_test application doesn't receive input on nrf52840 chip, while the echo_bot example does.

I encounter this problem:

The radio_test application works correctly on the official nrf52840dk board, but cannot receive input commands on my custom product board.

However, the echo_bot example works fine on the same custom board.

I tried adding the following configuration:

```conf

CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_SHELL_BACKEND_SERIAL=y

```

I also tried to disable hardware flow control in code:

```c

    nrf_uarte_hwfc_pins_disconnect(NRF_UART0);

```

I noticed that echo_bot doesn't disable hardware flow control but still works properly.

My product uses the nRF52840 chip connected through an external J-Link, and I'm using NCS v2.9.0.

Questions: What should I do? What configuration or code do I need to add to solve this problem?

Parents
  • Wang, I just took this thread and I will try to look into it and comeback to you by tomorrow evening with my observations. Thanks for your patience.

  • Thank you, Nuguru. I am very glad to receive your reply. And I want to provide some addition details.
    The issue occurss in the clock_init function:

    static void clock_init(void)
    {
    	int err = 0;
    	int res = 0;
    
    	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");
    }

    And I am debuggin tow board simultaneously to observe the different. I found the variable clk_cli.notify.flags will change its value from 1 to 0 on the official boards. However, on my custuom boards, it remains 1 after the onff_request call.

    The res variable behaves the same on both boards, always remaining zero.

    Thanks for looking into this issue.

Reply
  • Thank you, Nuguru. I am very glad to receive your reply. And I want to provide some addition details.
    The issue occurss in the clock_init function:

    static void clock_init(void)
    {
    	int err = 0;
    	int res = 0;
    
    	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");
    }

    And I am debuggin tow board simultaneously to observe the different. I found the variable clk_cli.notify.flags will change its value from 1 to 0 on the official boards. However, on my custuom boards, it remains 1 after the onff_request call.

    The res variable behaves the same on both boards, always remaining zero.

    Thanks for looking into this issue.

Children
No Data
Related