Taiyo Yuden EYSKJNZWB (nrf52840) + nRF Connect

Dear gurus,

App made with nRFConnect (Toolchain 2.2.0 + VSCode + Win10) works excellent on nRF52840-DK but not on own PCB with EYSKJNZWB.

Using "zephyr.hex" as output, which programs nicely to other DK board.

PCB and flash programming verified on the PCB - have old Segger app (SDK 17.0.0 / SoftDevice s140) working since 2 years.

Had to change some clock-defines in the old sdk_config.h, so I suspect 32kHz xtal is the problem now again.

Added "CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y" to the prj.cfg - but still dead as a doornail..

What have I missed?

All the best:

/Björn

Parents
  • Hi Björn,

    Have you tried any other example that doesn't use the LFCLK ? Something simple, like the blinky example ? 
    You still need to configure CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y to make the blinky works. 
    I attached here the 2 hex files for blinky (LED1 P0.13 is blinked) and peripheral_lbs that works with my board that doesn't have 32kHz crystal. 

    blinkyRC.hex

    peripheral_lbs_RC.hex

  • Thank you,

    Sorry, but P0.13 is not available on my PCB, but I can see that something is working because it consumes power.

    Can´t say the same for "peripheral_lbs_RC" - it consumes a steady 590uA but I cant see anything in my nRFConnect in phone.

  • Hi Björn, 
    In addition to espressos I would suggest to try testing on very simple application, toggling GPIO for example. 
    Maybe make sure you erase everything on the chip with a "nrfjprog.exe --recover "
    I assume if you try toggling GPIO with nRF5 SDK it would work just fine ? 

  • Dear Hung,

    Don´t understand why a simpler app would work when my "normal" app on my PCB runs excellent in debug mode?

    I have used "J-Flash V7.84a" for erasing and flashing, but will try command-line as you suggest.

    Any recommended version of "nrfjprog" or can i use my standard from "nRF-Command-Line-Tools_10_12_1_Installer_64"?

    Thank´s so much for help so far!

  • Hi again, 

    When running in debug mode some clock is kept running so I want you to test with something very simple that doesn't require any clock. 
    Zephyr application unfortunately always require LFCLK. So that's why I suggested to test with nRF5 blinky example . 

  • Thank you for your patience Hung,

    Just started working with NCS and zephyr last week. Nerd

    Will do exactly as you propose, if you please could get me some hints to an overlay to get a "blinky" LED

    to one of  P0.02, P0.03, P0.04, P0.05, P0.06, P0.07, P0.08, P0.28, or P0.30

    Sorry I can´t upload a schematic.

    All the best:

    /Björn

  • Hi Björn, 

    It can be tricky in Zephyr to do such a simple task. The learning curve can be pretty steep :) 

    I would strongly suggest to follow our course in our Nordic Academy to get started: 
    https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/


    For a quick test, if you are using Visual Studio Code:

    You can use the "Create a new board" button to create a new board, Mycustomboard for example
    You will then can create a new project that select the Custom Board. 
    The mycustomboard.dts will have something like this: 

    // Copyright (c) 2023 Nordic Semiconductor ASA
    // SPDX-License-Identifier: Apache-2.0
    
    /dts-v1/;
    #include <nordic/nrf52840_qiaa.dtsi>
    
    / {
    	model = "MyCustomboard";
    	compatible = "mycustomboard";
    
    	chosen {
    		zephyr,sram = &sram0;
    		zephyr,flash = &flash0;
    		zephyr,code-partition = &slot0_partition;
    	};
    };
    
    &flash0 {
    	partitions {
    		compatible = "fixed-partitions";
    		#address-cells = <1>;
    		#size-cells = <1>;
    
    		boot_partition: partition@0 {
    			label = "mcuboot";
    			reg = <0x0 0xc000>;
    		};
    		slot0_partition: partition@c000 {
    			label = "image-0";
    			reg = <0xc000 0x72000>;
    		};
    		slot1_partition: partition@7e000 {
    			label = "image-1";
    			reg = <0x7e000 0x72000>;
    		};
    		scratch_partition: partition@f0000 {
    			label = "image-scratch";
    			reg = <0xf0000 0xa000>;
    		};
    		storage_partition: partition@fa000 {
    			label = "storage";
    			reg = <0xfa000 0x6000>;
    		};
    	};
    };
    
    
     

    To add gpios you can change it to something like this: 

    // Copyright (c) 2023 Nordic Semiconductor ASA
    // SPDX-License-Identifier: Apache-2.0
    
    /dts-v1/;
    #include <nordic/nrf52840_qiaa.dtsi>
    
    / {
    	model = "MyCustomboard";
    	compatible = "mycustomboard";
    
    	chosen {
    		zephyr,sram = &sram0;
    		zephyr,flash = &flash0;
    		zephyr,code-partition = &slot0_partition;
    	};
    	gpiocustom {
            compatible = "gpio-leds";
            gpioled1: gpiocus_1 {
                gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
                label = "Custom gpio 18";
            };
            gpioled2: gpiocus_2 {
                gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
                label = "Custom gpio 13";
            };
        };
        aliases {
            gpioled1 = &gpioled1;
            gpioled2 = &gpioled2;
        };
    };
    &gpio0 {
    	status = "okay";
    };
    
    &flash0 {
    	partitions {
    		compatible = "fixed-partitions";
    		#address-cells = <1>;
    		#size-cells = <1>;
    
    		boot_partition: partition@0 {
    			label = "mcuboot";
    			reg = <0x0 0xc000>;
    		};
    		slot0_partition: partition@c000 {
    			label = "image-0";
    			reg = <0xc000 0x72000>;
    		};
    		slot1_partition: partition@7e000 {
    			label = "image-1";
    			reg = <0x7e000 0x72000>;
    		};
    		scratch_partition: partition@f0000 {
    			label = "image-scratch";
    			reg = <0xf0000 0xa000>;
    		};
    		storage_partition: partition@fa000 {
    			label = "storage";
    			reg = <0xfa000 0x6000>;
    		};
    	};
    };
    
    

    Notice how the gpios are added. 

    Then in the blinky application you can blink pin P0.02 by modifying line 14 to: 

    #define LED0_NODE DT_ALIAS(gpioled1)




Reply
  • Hi Björn, 

    It can be tricky in Zephyr to do such a simple task. The learning curve can be pretty steep :) 

    I would strongly suggest to follow our course in our Nordic Academy to get started: 
    https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/


    For a quick test, if you are using Visual Studio Code:

    You can use the "Create a new board" button to create a new board, Mycustomboard for example
    You will then can create a new project that select the Custom Board. 
    The mycustomboard.dts will have something like this: 

    // Copyright (c) 2023 Nordic Semiconductor ASA
    // SPDX-License-Identifier: Apache-2.0
    
    /dts-v1/;
    #include <nordic/nrf52840_qiaa.dtsi>
    
    / {
    	model = "MyCustomboard";
    	compatible = "mycustomboard";
    
    	chosen {
    		zephyr,sram = &sram0;
    		zephyr,flash = &flash0;
    		zephyr,code-partition = &slot0_partition;
    	};
    };
    
    &flash0 {
    	partitions {
    		compatible = "fixed-partitions";
    		#address-cells = <1>;
    		#size-cells = <1>;
    
    		boot_partition: partition@0 {
    			label = "mcuboot";
    			reg = <0x0 0xc000>;
    		};
    		slot0_partition: partition@c000 {
    			label = "image-0";
    			reg = <0xc000 0x72000>;
    		};
    		slot1_partition: partition@7e000 {
    			label = "image-1";
    			reg = <0x7e000 0x72000>;
    		};
    		scratch_partition: partition@f0000 {
    			label = "image-scratch";
    			reg = <0xf0000 0xa000>;
    		};
    		storage_partition: partition@fa000 {
    			label = "storage";
    			reg = <0xfa000 0x6000>;
    		};
    	};
    };
    
    
     

    To add gpios you can change it to something like this: 

    // Copyright (c) 2023 Nordic Semiconductor ASA
    // SPDX-License-Identifier: Apache-2.0
    
    /dts-v1/;
    #include <nordic/nrf52840_qiaa.dtsi>
    
    / {
    	model = "MyCustomboard";
    	compatible = "mycustomboard";
    
    	chosen {
    		zephyr,sram = &sram0;
    		zephyr,flash = &flash0;
    		zephyr,code-partition = &slot0_partition;
    	};
    	gpiocustom {
            compatible = "gpio-leds";
            gpioled1: gpiocus_1 {
                gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
                label = "Custom gpio 18";
            };
            gpioled2: gpiocus_2 {
                gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
                label = "Custom gpio 13";
            };
        };
        aliases {
            gpioled1 = &gpioled1;
            gpioled2 = &gpioled2;
        };
    };
    &gpio0 {
    	status = "okay";
    };
    
    &flash0 {
    	partitions {
    		compatible = "fixed-partitions";
    		#address-cells = <1>;
    		#size-cells = <1>;
    
    		boot_partition: partition@0 {
    			label = "mcuboot";
    			reg = <0x0 0xc000>;
    		};
    		slot0_partition: partition@c000 {
    			label = "image-0";
    			reg = <0xc000 0x72000>;
    		};
    		slot1_partition: partition@7e000 {
    			label = "image-1";
    			reg = <0x7e000 0x72000>;
    		};
    		scratch_partition: partition@f0000 {
    			label = "image-scratch";
    			reg = <0xf0000 0xa000>;
    		};
    		storage_partition: partition@fa000 {
    			label = "storage";
    			reg = <0xfa000 0x6000>;
    		};
    	};
    };
    
    

    Notice how the gpios are added. 

    Then in the blinky application you can blink pin P0.02 by modifying line 14 to: 

    #define LED0_NODE DT_ALIAS(gpioled1)




Children
Related