Network core of nRF5340 stuck on idle state

Hi all !

I'm new to the nRF MCU, I'm aiming to use one for a school project.

I've bought the devboard (nRF5340-DK) on a known website (Distrelec.fr, part of RS groupe). I've run the multicore example successfully, and I'm now a bit further, stuck on a situation a bit annoying.

Since the MCU will be placed on a custom PCB, I've developed on the device tree editor my own board, which its own config. This match my schematic, and my peripherals that I will be using.

To validate it, I was trying to make a LED blink (these pins match between the custom PCB and the DK), and I can only get the APP core to be running. The network core is stuck on an idle state and does nothing.

Here the two main.c files :

int main(void)
{
	int cnt = 0;
    nrf_gpio_cfg_output(LED_PIN2);

	while (1) {
		LOG_INF("test %d", cnt++);
		printk("Hello world from %s\n", CONFIG_BOARD);
        printk("Network core :)\n");

		k_msleep(500);
        nrf_gpio_pin_set(LED_PIN2);
        k_msleep(500);
        nrf_gpio_pin_clear(LED_PIN2);
	}

	return 0;
}

int main(void)
{
	int cnt = 0;
    nrf_gpio_cfg_output(LED_PIN1);
    nrf_gpio_cfg_output(LED_PIN2);
    nrf_gpio_pin_set(LED_PIN1);
    nrf_gpio_pin_clear(LED_PIN2);

	while (1) {
		LOG_INF("test %d", cnt++);
		printk("Hello world from %s\n", CONFIG_BOARD);
        printk("Application core :)\n");

		k_msleep(500);
        nrf_gpio_pin_set(LED_PIN1);
        nrf_gpio_pin_clear(LED_PIN2);
        k_msleep(500);
        nrf_gpio_pin_clear(LED_PIN1);
        nrf_gpio_pin_set(LED_PIN2);
	}

	return 0;
}

They're very similar to the example code, and, that's normal since I modified the example for my needs. I'm using sysbuild and the latest version of the toolchain.

Only the leds 30 and 31 are blinking, the 29 remains OFF.

So, what I did is to open the debugger, and right after the boot, the network core goes to idle, on a instruction 

_sleep_if_allowed wfi
and remains here forever. My code is never executed.

I don't know what I did wrong, nor what may be the cause of this state.

I'm willing to use the app core as main core (as specified)(control the position of the device, compute and correct trajectories...), while the network core will handle some low power task (logging on SPI EEPROM, comm with the PC, maybe BT...).

Thanks by advance for any help !

Leonard.

PS : if you want to look at the code : [github repo] https://github.com/lheywang/Opale

Parents
  • Hello,

    yes, I have looked at the application.

    Which version of NCS you are using? Did you try to run the application on the DK? I can see there is no configuration in your prj.conf file. 

    ''I've run the multicore example successfully, and I'm now a bit further, stuck on a situation a bit annoying.'' Do you mean multicore hello_world sample? In NCS v2.9.0, we do not have this sample but instead there is hello_world in the sysbuild sample. You can try to run that sample on your custom board first and see if it works for both cores. 

    The build command looks like this.

Reply
  • Hello,

    yes, I have looked at the application.

    Which version of NCS you are using? Did you try to run the application on the DK? I can see there is no configuration in your prj.conf file. 

    ''I've run the multicore example successfully, and I'm now a bit further, stuck on a situation a bit annoying.'' Do you mean multicore hello_world sample? In NCS v2.9.0, we do not have this sample but instead there is hello_world in the sysbuild sample. You can try to run that sample on your custom board first and see if it works for both cores. 

    The build command looks like this.

Children
No Data
Related