k_sleep() and printk() are not working on nrf54L15 dk

Hi there,

I am following  nRF Connect SDK Fundamentals and it looks like that both k_sleep() and printk() are not working.

GPIO is working but I am not sure why these two functions do not work.

Regarding printk(), I can see that CONFIG_SERIAL/CONFIG_CONSOL/CONFIG_UART_CONSO are all equal to y. So I assume nothing is needed to configurate.

Regarding k_sleep(), i have no idea what to be checked.

Could you give some hints to me so I could be able to make them work?

Thanks a lot!

Parents Reply Children
  • Hi there!

    Thanks for reply.

    I have tried to add K_MSEC to k_sleep, it is still not working.

    Attached files show what I am using, you can find k_sleep and k_msleep in main.c

    I am using 2.8 SDK and target board is nrf54115dk/nrf54l15/cpuapp.

    32755.prj.conf

    # SPDX-License-Identifier: Apache-2.0
    
    cmake_minimum_required(VERSION 3.20.0)
    find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
    project(trial)
    
    target_sources(app PRIVATE src/main.c)
    
    /*
     * Copyright (c) 2016 Intel Corporation
     *
     * SPDX-License-Identifier: Apache-2.0
     */
    
    #include <stdio.h>
    #include <zephyr/kernel.h>
    #include <zephyr/drivers/gpio.h>
    
    /* 1000 msec = 1 sec */
    #define SLEEP_TIME_MS 100
    
    /* The devicetree node identifier for the "led0" alias. */
    #define LED0_NODE DT_ALIAS(led0) //led0
    
    
    /*
     * A build error on this line means your board is unsupported.
     * See the sample documentation for information on how to fix this.
     */
    static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios);
    
    
    
    
    int main(void)
    {
    	int ret;
    
    
    	if (!gpio_is_ready_dt(&led)) {
    		return 0;
    	}
    	ret = gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE);
    	if (ret < 0) {
    		return 0;
    	}
      
    
    	while (1) {
    		
    	
    		gpio_pin_set_dt(&led,1);
    		k_msleep(SLEEP_TIME_MS);
    		gpio_pin_set_dt(&led,0);
    		k_msleep(SLEEP_TIME_MS);
    
    		gpio_pin_set_dt(&led,1);
    		k_sleep(K_MSEC(2000));
    		gpio_pin_set_dt(&led,0);
    		k_sleep(K_MSEC(2000));
    		
    	}
    	return 0;
    }
    

  • Hi there!

    I have used the same files which I attached to previous reply on nrf52840 DK, both k_sleep()/k_msleep() and printk() are working.

    Besides, I have used Bluetooth LE LBS example on both DKs, nrf52840 DK can work but nrf54L15 DK.

    Both DKs are using 2.8 SDK and VS code for development. Since everything is the same except hardware, may I now whether there is further configuration on top of the examples' setting? Or what should I do to bring nrf54L15 DK to work just like what nrf52840 behaves?

    Thanks!

  • You have two different builds here, and you build one for the nrf52840dk and the other for the nrf54l15dk?

    If you haven't already, I suggest to run through the devacademy course, just to ensure we are not overlooking something here: https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/ 

    Kenneth

  • Hi there!

    Yes there are always two builds, one for nrf54l15 DK and another one for nrf52840dk. Target board of nrf54l15 DK was mentioned before. nrf52840 DK is for counter check purpose. I have tried several sample codes from ncs fund and bt fund on these two DKs, it always turns out that only nrf52840 DK works but nrf54l15 DK. Same codes, same config file and same procedures are applied to both DKs. The only differences are build and target board. To simplify the problem, may I ask if you could run the files I attached to previous reply on your nrf54l15 DK? Thanks!

  • On the nRF54L15 DK there should be a white label with "PCA10156", can you provide the marking on the white label?

    Kenneth

Related