NRF54L10: I2C configuration error

Hello Team,

I'm using nrf54l15 dk and ncs version 2.9.0 for the development. I am getting an error while configuring I2C. I selected i2c20 from the device tree and assigned P1.00 for SCL and P1.01 for SDA. It generated the following code in the nrf54l15dk_nrf54l10_cpuapp.overlay file

&i2c20 {
	pinctrl-0 = <&i2c20_default>;
	pinctrl-names = "default";

};

&pinctrl {
	i2c20_default: i2c20_default {
		group1 {
			psels = <NRF_PSEL(TWIM_SDA, 1, 1)>, <NRF_PSEL(TWIM_SCL, 1, 0)>;
		};
	};
};

Added the following configuration in the prj.conf file

CONFIG_I2C=y
CONFIG_PINCTRL=y
And wrote the following code to initialize I2C
#define I2C_NODE        DT_NODELABEL(i2c20)
const struct device *const i2c_dev = DEVICE_DT_GET(I2C_NODE);
const uint16_t i2c_addr = 0x68;
const struct i2c_dt_spec *i2c_spec;

i2c_spec = I2C_DT_SPEC_GET(I2C_NODE);
I'm getting the following error
devicetree error: 'pinctrl-0' is marked as required in 'properties:' in C:/ncs/v2.9.0/zephyr/dts/bindings\i2c\nordic,nrf-twim.yaml, but does not appear in <Node /soc/peripheral@50000000/i2c@c6000 in 'C:/ncs/v2.9.0/zephyr/misc/empty_file.c'>
Kindly help me resolve the error.
Regards,
Payal
Parents
  • Hi,

     

    P1.00 / P1.01 is by default used for the external LFXO. If testing on a DK, you should choose other pins.

    I am testing blinky, with your proposed overlay file in ncs v2.9.0, and I am unable to see this issue when compiling for nrf54l15/nrf54l10/cpuapp.

     

    Have you done any board-related changes in the zephyr/boards/nordic/nrf54l15dk catalog? If yes, try reverting those.

     

    Kind regards,

    Håkon

  • Hi,

    I tried configuring P1.02 for SDA and P1.03 for SCL. Now I am getting the following error.

    CMake Error at C:/ncs/v2.9.0/zephyr/cmake/modules/FindDeprecated.cmake:40 (if):
    if given arguments:

    "CROSS_COMPILE" "IN_LIST" "Deprecated_FIND_COMPONENTS"

    I am testing blinky, with your proposed overlay file in ncs v2.9.0, and I am unable to see this issue when compiling for nrf54l15/nrf54l10/cpuapp.

    While compiling the blinky sample for nrf54l10, I didn't add the .overlay file, but still I was getting the error.

    Have you done any board-related changes in the zephyr/boards/nordic/nrf54l15dk catalog? If yes, try reverting those.

    No, I didn't change anything in the zephyr/boards/nordic/nrf54l15dk catalog.

    While compiling any of the sample codes for nrf54l10 (not including .overlay file), I am getting the "devicetree error: 'pinctrl-0' is marked as required in 'properties:' in C:/ncs/v2.9.0/zephyr/dts/bindings\i2c\nordic,nrf-twim.yaml, but does not appear in <Node /soc/peripheral@50000000/i2c@c6000 in 'C:/ncs/v2.9.0/zephyr/misc/empty_file.c'>" error

  • Hi,

     

    And how does your .overlay file look now?

    It seems that you're lacking the pinctrl-1 entry, based on the error message.

     

    Kind regards,

    Håkon

  • Hi,

    It seems that you're lacking the pinctrl-1 entry, based on the error message.

    Yes, the pinctrl-1 entry was missing; adding it successfully compiled my code.

    Thanks for the help.

    I have one doubt when I configured P1.12 and P1.14 for SDA and SCL, in devicetree.

    Only the code below is generated in my .overlayfile

    &pinctrl {
        i2c21_default: i2c21_default {
            group1 {
                psels = <NRF_PSEL(TWIM_SCL, 1, 12)>, <NRF_PSEL(TWIM_SDA, 1, 14)>;
            };
        };
    };
    
    &i2c21 {
        status = "okay";
        pinctrl-0 = <&i2c21_default>;
        pinctrl-names = "default";
        zephyr,deferred-init;
    };

    Can you help me understand why pincntrl-1 entry code and 

    i2c20_sleep: i2c20_sleep {
    group1 {
    psels = <NRF_PSEL(TWIM_SDA, 1, 11)>,
    <NRF_PSEL(TWIM_SCL, 1, 12)>;
    low-power-enable;
    };
    };

    is not generated?

    Are there any additional settings for this?

    Thanks,

    Payal

  • Hi,

     

    You are currently using i2c21 and not i2c20, so this entry will not be used:

    payalD said:
    i2c20_sleep: i2c20_sleep {
    group1 {
    psels = <NRF_PSEL(TWIM_SDA, 1, 11)>,
    <NRF_PSEL(TWIM_SCL, 1, 12)>;
    low-power-enable;
    };
    };

     

    Kind regards,

    Håkon

  • Hi, 

    You are currently using i2c21 and not i2c20, so this entry will not be used:

    Understood. But for i2c21 below entry should be generated

    i2c21_sleep: i2c21_sleep {
    group1 {
    psels = <NRF_PSEL(TWIM_SDA, 1, 12)>,
    <NRF_PSEL(TWIM_SCL, 1, 14)>;
    low-power-enable;
    };
    };

    Right?

    Why is it not generated when I configure i2c21 in the devicetree?

    What is the significance of this entry?

  • Hi,

     

    payalD said:

    Right?

    Why is it not generated when I configure i2c21 in the devicetree?

    What is the significance of this entry?

    I am not sure I understand what you mean here.

     

    You setup i2c21 to only hold a default pin setup:

    &i2c21 {
        status = "okay";
        pinctrl-0 = <&i2c21_default>;
        pinctrl-names = "default";
        ...
    };

    Which will not refer to any other instances than the "i2c21_default" in this case.

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    payalD said:

    Right?

    Why is it not generated when I configure i2c21 in the devicetree?

    What is the significance of this entry?

    I am not sure I understand what you mean here.

     

    You setup i2c21 to only hold a default pin setup:

    &i2c21 {
        status = "okay";
        pinctrl-0 = <&i2c21_default>;
        pinctrl-names = "default";
        ...
    };

    Which will not refer to any other instances than the "i2c21_default" in this case.

     

    Kind regards,

    Håkon

Children
No Data
Related