Board support for nrf54l15 QFN40 (QDAA), CSP47 (CAAA) and QFN52 (QGAA)

Hi,

I am developing on nRF54L15 chip by using Insight ISP2454-LX variant, and while creating new board for it, I am unable to find package variants other than OFN48 (QFAA). 

And by continuing with QFN48 board, I am getting error as I am trying to use P1.15 pin which is available in QFN52 but not in QFAA.

So, how to solve this issue?

And I also tried following this method mentioned in the devzone and encounter some error

NCS 3.0.2 Create new board wizard missing nRF54L05/10 - Nordic Q&A - Nordic DevZone - Nordic DevZone


error

[08:57:05] nrfutil-sdk-manager install v3.2.1 --sdk-path c:\ncs\v3.2.1 --type nrf: Unpacked SDK tarball: success
[west]: {"schema": {"title": "nRF Connect SDK Board", "type": "object", "required": ["board", "description", "vendor", "soc", "root"], "properties": {"board": {"title": "Board name", "type": "string", "pattern": "^[a-zA-Z0-9_-]+$"}, "description": {"title": "Description", "type": "string"}, "vendor": {"title": "Vendor name", "type": "string", "pattern": "^[a-zA-Z0-9_-]+$"}, "soc": {"title": "SoC", "type": "string", "enum": ["nRF52805-CAAA", "nRF52810-QFAA", "nRF52811-QFAA", "nRF52820-QDAA", "nRF52832-CIAA", "nRF52832-QFAA", "nRF52832-QFAB", "nRF52833-QDAA", "nRF52833-QIAA", "nRF52840-QFAA", "nRF52840-QIAA", "nRF5340-QKAA", "nRF54L05-QFAA", "nRF54L10-QFAA", "nRF54L15-QFAA", "nRF9131-LACA", "nRF9151-LACA", "nRF9160-SICA", "nRF9161-LACA"]}, "root": {"title": "Board root", "type": "string"}}}, "state": null}
[west]: {"schema": {"title": "nRF Connect SDK Board", "type": "object", "required": ["board", "description", "vendor", "soc", "root"], "properties": {"board": {"title": "Board name", "type": "string", "pattern": "^[a-zA-Z0-9_-]+$"}, "description": {"title": "Description", "type": "string"}, "vendor": {"title": "Vendor name", "type": "string", "pattern": "^[a-zA-Z0-9_-]+$"}, "soc": {"title": "SoC", "type": "string", "enum": ["nRF52805-CAAA", "nRF52810-QFAA", "nRF52811-QFAA", "nRF52820-QDAA", "nRF52832-CIAA", "nRF52832-QFAA", "nRF52832-QFAB", "nRF52833-QDAA", "nRF52833-QIAA", "nRF52840-QFAA", "nRF52840-QIAA", "nRF5340-QKAA", "nRF54L05-QFAA", "nRF54L10-QFAA", "nRF54L15-QFAA", "nRf54L15-CAAA", "nRF9131-LACA", "nRF9151-LACA", "nRF9160-SICA", "nRF9161-LACA"]}, "root": {"title": "Board root", "type": "string"}}}, "state": null}
[west]: {
[west]:   "errors": [
[west]:     {
[west]:       "type": "ValueError",
[west]:       "message": "Invalid/unsupported variant: caaa",
[west]:       "traceback": "  File \"<frozen runpy>\", line 198, in _run_module_as_main\n  File \"<frozen runpy>\", line 88, in _run_code\n  File \"C:\\ncs\\toolchains\\66cdf9b75e\\opt\\bin\\Scripts\\west.exe\\__main__.py\", line 7, in <module>\n    sys.exit(main())\n             ^^^^^^\n  File \"C:\\ncs\\toolchains\\66cdf9b75e\\opt\\bin\\Lib\\site-packages\\west\\app\\main.py\", line 1199, in main\n    app.run(argv or sys.argv[1:])\n  File \"C:\\ncs\\toolchains\\66cdf9b75e\\opt\\bin\\Lib\\site-packages\\west\\app\\main.py\", line 278, in run\n    self.run_command(argv, early_args)\n  File \"C:\\ncs\\toolchains\\66cdf9b75e\\opt\\bin\\Lib\\site-packages\\west\\app\\main.py\", line 584, in run_command\n    self.run_extension(args.command, argv)\n  File \"C:\\ncs\\toolchains\\66cdf9b75e\\opt\\bin\\Lib\\site-packages\\west\\app\\main.py\", line 739, in run_extension\n    self.cmd.run(args, unknown, self.topdir, manifest=self.manifest,\n  File \"C:\\ncs\\toolchains\\66cdf9b75e\\opt\\bin\\Lib\\site-packages\\west\\commands.py\", line 200, in run\n    self.do_run(args, unknown)\n  File \"C:\\ncs\\v3.1.1\\nrf\\scripts\\west_commands\\create_board\\ncs_create_board.py\", line 138, in do_run\n    raise ValueError(f\"Invalid/unsupported variant: {req_variant}\")\n"
[west]:     }
[west]:   ]
[west]: }
 
[west]: exited with code 1.


Parents
  • Hi Shivam, 
    I will check internally, could you show me the error log when you try to assign something to P1.15 ? 

  • Hi Hung,


    Here are the error logs when I try to assign P1.15

    ASSERTION FAIL [nrf_gpio_pin_present_check(*p_pin)] @ WEST_TOPDIR/modules/hal/nordic/nrfx/hal/nrf_gpio.h:930
    [00:00:00.001,849] <err> os: r0/a1:  0x00000004  r1/a2:  0x000003a2  r2/a3:  0x00000000
    [00:00:00.002,040] <err> os: r3/a4:  0x00000004 r12/ip:  0x00000000 r14/lr:  0x00034cf7
    [00:00:00.002,224] <err> os:  xpsr:  0x09000000
    [00:00:00.002,358] <err> os: Faulting instruction address (r15/pc): 0x0004dc78
    [00:00:00.002,530] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
    [00:00:00.002,700] <err> os: Current thread: 0x2000a9a8 (main)
    [00:00:00.002,852] <err> coredump: #CD:LOCATION 0x20023fb0
    [00:00:00.002,998] <err> coredump: #CD:BEGIN#
    [00:00:00.577,412] <err> coredump: #CD:END#
    [00:00:01.132,075] <err> os: Halting system




    And here are the respective files which were provided by the SDK v3.0.1 (and v3.0.2 does not provide other variants) while creating the custom nrf54l15 board with OFN48 (QFAA) as other options were unavailable.

    board.cmake
    if (CONFIG_SOC_NRF54L15_CPUAPP)
      board_runner_args(jlink "--device=cortex-m33" "--speed=4000")
    elseif (CONFIG_SOC_NRF54L15_CPUFLPR)
      board_runner_args(jlink "--speed=4000")
    endif()
    
    include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake)
    include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
    include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)



    board.yml
    board:
      name: board_name
      vendor: cust
      socs:
        - name: nrf54l15
          variants:
            - name: xip
              cpucluster: cpuflpr



    board_name.yaml
    identifier: board_name/nrf54l15/cpuapp
    name: CUST BOARD_NAME
    vendor: cust
    type: mcu
    arch: arm
    ram: 256
    flash: 1524
    toolchain:
      - zephyr
      - gnuarmemb
      - xtools
    supported:
      - gpio
      - i2c
      - spi
      - uart



    Kconfig.board_name
    config BOARD_BOARD_NAME
    	select SOC_NRF54L15_CPUAPP if BOARD_BOARD_NAME_NRF54L15_CPUAPP
    	select SOC_NRF54L15_CPUFLPR if \
    		BOARD_BOARD_NAME_NRF54L15_CPUFLPR || \
    		BOARD_BOARD_NAME_NRF54L15_CPUFLPR_XIP



    Kconfig.defconfig
    if BOARD_BOARD_NAME_CPUAPP
    
    config ROM_START_OFFSET
    	default 0x800 if BOOTLOADER_MCUBOOT
    
    endif # BOARD_BOARD_NAME_CPUAPP



    board_name.dts
    #include <nordic/nrf54l15_cpuapp.dtsi>


  • Hi Shivam, 
    From what I can see nrf_gpio_pin_present_check() should pass even if you use P1.15. 
    You can find in \modules\hal\nordic\nrfx\mdk\nrf54l15_application_peripherals.h

    P1 was defined with: 
    #define P1_PIN_NUM_MIN 0 /*!< (unspecified) */
    #define P1_PIN_NUM_MAX 16 /*!< (unspecified) */
    #define P1_PIN_NUM_SIZE 17 /*!< (unspecified) */
    #define P1_FEATURE_PINS_PRESENT 131071 /*!< (unspecified) */
    This mean it support to P1.16.

    I did a quick test here to use P1.15 in blinky sample (with the DK board file) and it doesn't seem it complain about P1.15. 

    My suggestion is to try testing with the DK first, try to toggle P1.15, make sure it run on a DK (won't be able to toggle anything of course) then flash it to your board to see if the pin actually get toggling. 

    I suspect something wrong when you create your own board. 

  • Hi Hung,


    I tried the suggested part on the DK and surprisingly, it works.

    main.c

    #include <zephyr/kernel.h>
    #include <zephyr/device.h>
    #include <zephyr/devicetree.h>
    #include <zephyr/drivers/gpio.h>
    #include <zephyr/sys/printk.h>
    
    /* Node label from the overlay: user_input: user-input { ... } */
    #define USER_INPUT_NODE DT_NODELABEL(user_input)
    
    static const struct gpio_dt_spec user_input =
    	GPIO_DT_SPEC_GET(USER_INPUT_NODE, gpios);
    
    int main(void)
    {
    	int ret;
    
    	if (!device_is_ready(user_input.port)) {
    		printk("GPIO device not ready\n");
    		return -1;
    	}
    
    	/* Configure as input; pull-up comes from DT flags */
    	ret = gpio_pin_configure_dt(&user_input, GPIO_INPUT);
    	if (ret < 0) {
    		printk("Failed to configure pin: %d\n", ret);
    		return -1;
    	}
    
    	while (1) {
    		int val = gpio_pin_get_dt(&user_input);
    		if (val < 0) {
    			printk("Read error: %d\n", val);
    		} else {
    			printk("P1.15 level = %d\n", val);
    		}
    		k_msleep(500);
    	}
    }


    .overlay
    /*
     * Copyright (c) 2024 Nordic Semiconductor ASA
     *
     * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
     */
    
    / {
        user_input: user-input {
            compatible = "nordic,gpio-pins";
            /* Port 1, pin 15, pull-up, active high */
            gpios = <&gpio1 15 (GPIO_PULL_UP | GPIO_ACTIVE_HIGH)>;
            status = "okay";
        };
    };
    
    &gpio1 {
        status = "okay";
    };
    
    &gpiote20 {
        status = "okay";
    };



    But when I flashed the same working firmware on custom board, it crashes.

    So, is there a way or workaround to work with P1.15 pin. And any updates related to having other variant support?

    And also, when I flashed the custom board firmware on DK, it gives me same error that I am having in custom board.

  • Hi Shivam, 
    I suspect that it has something to do with the QFN52 variant as it's not reproducible on the DK here as well. 
    Could you try to put a breakpoint inside nrf_gpio_pin_present_check() function inside nrf_gopio.h and step there to see where/why exactly it crashes ? 

    I just want to double check, could you confirm that the exact hex file you flashed on the DK worked fine, but it crash on your board with nrf_gpio_pin_present_check() issue in the log as you shown earlier ? I need to know if they use the same hex and behave differently. 

Reply
  • Hi Shivam, 
    I suspect that it has something to do with the QFN52 variant as it's not reproducible on the DK here as well. 
    Could you try to put a breakpoint inside nrf_gpio_pin_present_check() function inside nrf_gopio.h and step there to see where/why exactly it crashes ? 

    I just want to double check, could you confirm that the exact hex file you flashed on the DK worked fine, but it crash on your board with nrf_gpio_pin_present_check() issue in the log as you shown earlier ? I need to know if they use the same hex and behave differently. 

Children
Related