Configuring for TWIM is not working for NRF54L15 custom board

Currently, in the early stage of code development with NCS 2.8.0, I'm getting some errors when configuring I2C (TWIM) for a sensor device in a custom board.

The overlay is the following:

&i2c21 {
    status = "okay";
    compatible = "nordic,nrf-twim";
    pinctrl-0 = <&i2c21_default>;
    pinctrl-names = "default";
    clock-frequency = <I2C_BITRATE_FAST_PLUS>;
};

&pinctrl {
    i2c21_default: i2c21_default {
        group1 {
            psels = <NRF_PSEL(TWIM_SCL, 1, 3)>, <NRF_PSEL(TWIM_SDA, 1, 4)>;
        };
    };
};

&i2c22 {
    status = "okay";
    compatible = "nordic,nrf-twim";
    pinctrl-0 = <&i2c22_default>;
    pinctrl-names = "default";
    clock-frequency = <I2C_BITRATE_FAST_PLUS>;
};

&pinctrl {
    i2c22_default: i2c22_default {
        group1 {
            psels = <NRF_PSEL(TWIM_SCL, 1, 11)>, <NRF_PSEL(TWIM_SDA, 1, 12)>;
        };
    };
};


Note, if the speed is set to standard or fast, the problem not arise but otherwise the message I got is as following.

[15/184] Building C object zephyr/drivers/i2c/CMakeFiles/drivers__i2c.dir/i2c_nrfx_twim.c.obj
FAILED: zephyr/drivers/i2c/CMakeFiles/drivers__i2c.dir/i2c_nrfx_twim.c.obj
C:\ncs\toolchains\2d382dcd92\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DK_HEAP_MEM_POOL_SIZE=0 -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE=\"nrf-psa-crypto-config.h\" -DNCS_APPLICATION_BOOT_BANNER_GIT_REPO -DNRF54L15_XXAA -DNRF_APPLICATION -DNRF_CONFIG_CPU_FREQ_MHZ=128 -DNRF_DISABLE_FICR_TRIMCNF -DNRF_SKIP_CLOCK_CONFIGURATION -DNRF_SKIP_GLITCHDETECTOR_DISABLE -DNRF_TRUSTZONE_NONSECURE -DPICOLIBC_LONG_LONG_PRINTF_SCANF -DUSE_PARTITION_MANAGER=1 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -IC:/ncs/v2.8.0/nrf/drivers/mpsl/clock_control -IC:/nordic/workspace/otimize_sensor/build/otimize_sensor/zephyr/include/generated/zephyr -IC:/ncs/v2.8.0/zephyr/include -IC:/nordic/workspace/otimize_sensor/build/otimize_sensor/zephyr/include/generated -IC:/ncs/v2.8.0/zephyr/soc/nordic -IC:/ncs/v2.8.0/zephyr/soc/nordic/nrf54l/. -IC:/ncs/v2.8.0/zephyr/soc/nordic/common/. -IC:/ncs/v2.8.0/zephyr/subsys/bluetooth -IC:/ncs/v2.8.0/nrf/include -IC:/ncs/v2.8.0/nrf/lib/multithreading_lock/. -IC:/ncs/v2.8.0/nrf/subsys/bluetooth/controller/. -IC:/nordic/workspace/otimize_sensor/build/otimize_sensor/tfm/api_ns/interface/include -IC:/ncs/v2.8.0/nrf/modules/trusted-firmware-m/. -IC:/ncs/v2.8.0/nrf/include/tfm -IC:/ncs/v2.8.0/nrf/tests/include -IC:/ncs/v2.8.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.8.0/zephyr/modules/cmsis/. -IC:/ncs/v2.8.0/modules/hal/nordic/nrfx -IC:/ncs/v2.8.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.8.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.8.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.8.0/modules/crypto/tinycrypt/lib/include -IC:/ncs/v2.8.0/nrfxlib/mpsl/fem/common/include -IC:/ncs/v2.8.0/nrfxlib/mpsl/fem/nrf21540_gpio/include -IC:/ncs/v2.8.0/nrfxlib/mpsl/fem/nrf21540_gpio_spi/include -IC:/ncs/v2.8.0/nrfxlib/mpsl/fem/nrf2220/include -IC:/ncs/v2.8.0/nrfxlib/mpsl/fem/nrf2240/include -IC:/ncs/v2.8.0/nrfxlib/mpsl/fem/nrf22xx/include -IC:/ncs/v2.8.0/nrfxlib/mpsl/fem/simple_gpio/include -IC:/ncs/v2.8.0/nrfxlib/mpsl/fem/include -IC:/ncs/v2.8.0/nrfxlib/mpsl/fem/include/protocol -IC:/ncs/v2.8.0/nrfxlib/mpsl/include -IC:/ncs/v2.8.0/nrfxlib/mpsl/include/protocol -IC:/nordic/workspace/otimize_sensor/build/otimize_sensor/generated/interface_nrf_security_psa -IC:/ncs/v2.8.0/nrf/subsys/nrf_security/include -IC:/ncs/v2.8.0/modules/crypto/oberon-psa-crypto/include -IC:/ncs/v2.8.0/nrf/subsys/nrf_security/src/utils -IC:/ncs/v2.8.0/modules/crypto/oberon-psa-crypto/library -IC:/ncs/v2.8.0/modules/crypto/mbedtls/library -IC:/ncs/v2.8.0/modules/crypto/mbedtls/include -IC:/ncs/v2.8.0/modules/crypto/mbedtls/include/library -IC:/ncs/v2.8.0/nrfxlib/crypto/nrf_oberon/include -IC:/ncs/v2.8.0/nrfxlib/crypto/nrf_oberon/include/mbedtls -IC:/ncs/v2.8.0/nrfxlib/softdevice_controller/include -isystem C:/ncs/v2.8.0/zephyr/lib/libc/common/include -Os -DNDEBUG -Wshadow -fno-strict-aliasing -Os -imacros C:/nordic/workspace/otimize_sensor/build/otimize_sensor/zephyr/include/generated/zephyr/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=C:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.8.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/nordic/workspace/otimize_sensor=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.8.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.8.0=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -MD -MT zephyr/drivers/i2c/CMakeFiles/drivers__i2c.dir/i2c_nrfx_twim.c.obj -MF zephyr\drivers\i2c\CMakeFiles\drivers__i2c.dir\i2c_nrfx_twim.c.obj.d -o zephyr/drivers/i2c/CMakeFiles/drivers__i2c.dir/i2c_nrfx_twim.c.obj -c C:/ncs/v2.8.0/zephyr/drivers/i2c/i2c_nrfx_twim.c
In file included from C:/ncs/v2.8.0/zephyr/include/zephyr/toolchain.h:50,
from C:/ncs/v2.8.0/zephyr/include/zephyr/sys/__assert.h:11,
from C:/ncs/v2.8.0/zephyr/include/zephyr/irq_multilevel.h:15,
from C:/ncs/v2.8.0/zephyr/include/zephyr/devicetree.h:20,
from C:/ncs/v2.8.0/zephyr/include/zephyr/device.h:12,
from C:/ncs/v2.8.0/zephyr/include/zephyr/drivers/i2c.h:27,
from C:/ncs/v2.8.0/zephyr/drivers/i2c/i2c_nrfx_twim.c:8:
C:/ncs/v2.8.0/zephyr/include/zephyr/toolchain/gcc.h:87:36: error: static assertion failed: "Wrong I2C 21 frequency setting in dts"
87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert((EXPR), "" MSG)
| ^~~~~~~~~~~~~~
C:/ncs/v2.8.0/zephyr/drivers/i2c/i2c_nrfx_twim.c:398:9: note: in expansion of macro 'BUILD_ASSERT'
398 | BUILD_ASSERT(I2C_FREQUENCY(idx) != \
| ^~~~~~~~~~~~
C:/ncs/v2.8.0/zephyr/drivers/i2c/i2c_nrfx_twim.c:463:1: note: in expansion of macro 'I2C_NRFX_TWIM_DEVICE'
463 | I2C_NRFX_TWIM_DEVICE(21);
| ^~~~~~~~~~~~~~~~~~~~
C:/ncs/v2.8.0/zephyr/include/zephyr/toolchain/gcc.h:87:36: error: static assertion failed: "Wrong I2C 22 frequency setting in dts"
87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert((EXPR), "" MSG)
| ^~~~~~~~~~~~~~
C:/ncs/v2.8.0/zephyr/drivers/i2c/i2c_nrfx_twim.c:398:9: note: in expansion of macro 'BUILD_ASSERT'
398 | BUILD_ASSERT(I2C_FREQUENCY(idx) != \
| ^~~~~~~~~~~~
C:/ncs/v2.8.0/zephyr/drivers/i2c/i2c_nrfx_twim.c:467:1: note: in expansion of macro 'I2C_NRFX_TWIM_DEVICE'
467 | I2C_NRFX_TWIM_DEVICE(22);
| ^~~~~~~~~~~~~~~~~~~~
[48/184] Building C object zephyr/drivers/serial/CMakeFiles/drivers__serial.dir/uart_nrfx_uarte.c.obj
ninja: build stopped: subcommand failed.

Is there something I'm missing ?
Thanks in advance for help.

Parents Reply Children
Related