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 Reply Children
  • 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)




  • Thank you Hung,

    Already started with a custom board after the steps in the nice video, but got stuck trying to untangle the hierachy of #includes.. Also reading the board files for simple Adafruiit board and got a bit wiser..

    Your example will surely get me closer! Will be back after implementing.

    BTW:Will happily donate all Altium files for this little board to the community as a thank´s for help, if there is any interest.

  • Update:

    Changed my .dts

    Made new blinky-project with my board + changed #define for new LED

    Everything compiles OK

    VSCode finds my board OK

    Flashing PCB goes OK - but no blinks

    Debugging runs OK - but no blinks

    Flashing with J-Flash works OK - but no blinks

    Since my more complex app with BLE advertising ran fine when debugging, what does that tell us?

Related