nRF54LM20 I2C Communication issue

Hi Team,

I am trying BMI270 Sample using nRF54LM20 DK. But the problem here is it getting exited after checking the device is ready section. 

/* ---------------- PIN CONTROL ---------------- */
&pinctrl {

    i2c20_default_alt: i2c20_default_alt {
        group1 {
            psels = <
                NRF_PSEL(TWIM_SDA, 1, 17)
                NRF_PSEL(TWIM_SCL, 1, 16)
            >;
        };
    };

    i2c20_sleep_alt: i2c20_sleep_alt {
        group1 {
            psels = <
                NRF_PSEL(TWIM_SDA, 1, 17)
                NRF_PSEL(TWIM_SCL, 1, 16)
            >;
            low-power-enable;
        };
    };

};

/* ---------------- USB ---------------- */
&zephyr_udc0 {
    cdc_acm_uart0: cdc_acm_uart0 {
        compatible = "zephyr,cdc-acm-uart";
    };

    cdc_acm_uart1: cdc_acm_uart1 {
        compatible = "zephyr,cdc-acm-uart";
    };
};

/* ---------------- I2C + BMI270 ---------------- */

&i2c20 {
    status = "okay";

    pinctrl-0 = <&i2c20_default_alt>;
    pinctrl-1 = <&i2c20_sleep_alt>;
    pinctrl-names = "default", "sleep";

    clock-frequency = <I2C_BITRATE_STANDARD>;

    bmi270: bmi270@69 {
        compatible = "bosch,bmi270";
        reg = <0x69>;
        status = "okay";
    };
};


&uart20 {
    status = "disabled";
};


/* ---------------- BUZZER ---------------- */
 / {
    aliases {
        bmi270 = &bmi270;

    };

};


Added my overlay file for your reference.

Thanks and regards,

Vinay

Parents
  • Is there any default pins we have to use for I2C Communication? 

    If yes, please let me know which pin we have to use on nRF54LM20 DK.

    Thanks, and regards,

    Vinay

  • Hello,

    If you look at the silkscreen on the backside of the board, you can see that P1.17 and P1.16 are both connected to the on board debugger (VCOMs). To free these pins, you can use the board configurator app and disable VCOM1: https://docs.nordicsemi.com/bundle/ug_nrf54lm20_dk/page/UG/nRF54LM20_DK/hw_desription/board_control.html 

  • Hi Vidar,

    Thank you for the reply.

    We need to configure 2 I2C master bus in nRF54LM20. Is it possible?

    thanks and regards,

    Vinay

  • Hi Vidar,

    I have used default BMI270 example, which is used for Arduino I2C Node. Is it possible to modify it as per nRF54LM20B dts compliance?

    Please let me know the limitations if not.

    Thanks, and regards,

    Vinay

  • Hi Vinay,

    I would appreciate it if you could follow up on my initial suggestion and let me know whether it fixed the problem. Otherwise it will be difficult for me to help you troubleshoot the problem. 

    From the datasheet you can see that the nRF54LM20 has 6 TWI instances (Note: each instance is shared with SPI/UART, see Peripherals with shared ID)

    Best regards,

    Vidar

  • Hi Vidar,

    I am using I2C21 instance for nRF54LM20 and I have not enabled any other peripheral instances. 
    I have gone through your suggestions and then I had replied previously.
    I have understood your point thats why I had changed the pinmux for I2C Instance I am using. Now its P1.20 and P1.21. I hope thats not been used by any other bus or peripherals. 

    I am trying to communicate with BMI270 Sensor. I am using SDK example BMI270. I observed that the app.overlay is used for Arduino I2C. So using the configuration I have generated overlay for nRF54LM20B. But still when I debug the application I can see its showing device is not ready.

    Adding overlay for your reference.

    /* ---------------- PIN CONTROL ---------------- */
    &pinctrl {
    
        i2c3_my_default: i2c23_default_alt {
            group1 {
                psels = <
                    NRF_PSEL(TWIM_SDA, 1, 21)
                    NRF_PSEL(TWIM_SCL, 1, 20)
                >;
                bias-pull-up;
            };
        };
    
        i2c3_my_sleep: i2c23_sleep_alt {
            group1 {
                psels = <
                    NRF_PSEL(TWIM_SDA, 1, 21)
                    NRF_PSEL(TWIM_SCL, 1, 20)
                >;
                low-power-enable;
            };
        };
    
    };
    
    /* ---------------- USB ---------------- */
    &zephyr_udc0 {
        cdc_acm_uart0: cdc_acm_uart0 {
            compatible = "zephyr,cdc-acm-uart";
        };
    
        cdc_acm_uart1: cdc_acm_uart1 {
            compatible = "zephyr,cdc-acm-uart";
        };
    };
    
    /* ---------------- I2C + BMI270 ---------------- */
    
    &i2c23 {
    	compatible = "nordic,nrf-twim";
    	status = "okay";
    	pinctrl-0 = <&i2c3_my_default>;
    	pinctrl-1 = <&i2c3_my_sleep>;
    	pinctrl-names = "default", "sleep";
    	zephyr,concat-buf-size = <257>;
        bmi270@68 {
                compatible = "bosch,bmi270";
                reg = <0x68>;
        };	
    };
    
    &uart20 {
        status = "disabled";
    };
    
    
    /* ---------------- BUZZER ---------------- */
     / {
        aliases {
            bmi270 = &bmi270;
    
        };
    
    };
    
    
    /*
    
    #include <zephyr/dt-bindings/pwm/pwm.h>
    
    / {
    	aliases {
    		pwm-led0 = &pwm_led2;
    	};
    
    	pwmleds {
    		compatible = "pwm-leds";
    
    		pwm_led2: pwm_led_2 {
    			pwms = <&pwm130 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
    		};
    	};
    };
    
    &pwm130 {
    	status = "okay";
    	pinctrl-0 = <&pwm130_default>;
    	pinctrl-1 = <&pwm130_sleep>;
    	pinctrl-names = "default", "sleep";
    };
    
    */

    Thanks and regards,

    Vinay

Reply
  • Hi Vidar,

    I am using I2C21 instance for nRF54LM20 and I have not enabled any other peripheral instances. 
    I have gone through your suggestions and then I had replied previously.
    I have understood your point thats why I had changed the pinmux for I2C Instance I am using. Now its P1.20 and P1.21. I hope thats not been used by any other bus or peripherals. 

    I am trying to communicate with BMI270 Sensor. I am using SDK example BMI270. I observed that the app.overlay is used for Arduino I2C. So using the configuration I have generated overlay for nRF54LM20B. But still when I debug the application I can see its showing device is not ready.

    Adding overlay for your reference.

    /* ---------------- PIN CONTROL ---------------- */
    &pinctrl {
    
        i2c3_my_default: i2c23_default_alt {
            group1 {
                psels = <
                    NRF_PSEL(TWIM_SDA, 1, 21)
                    NRF_PSEL(TWIM_SCL, 1, 20)
                >;
                bias-pull-up;
            };
        };
    
        i2c3_my_sleep: i2c23_sleep_alt {
            group1 {
                psels = <
                    NRF_PSEL(TWIM_SDA, 1, 21)
                    NRF_PSEL(TWIM_SCL, 1, 20)
                >;
                low-power-enable;
            };
        };
    
    };
    
    /* ---------------- USB ---------------- */
    &zephyr_udc0 {
        cdc_acm_uart0: cdc_acm_uart0 {
            compatible = "zephyr,cdc-acm-uart";
        };
    
        cdc_acm_uart1: cdc_acm_uart1 {
            compatible = "zephyr,cdc-acm-uart";
        };
    };
    
    /* ---------------- I2C + BMI270 ---------------- */
    
    &i2c23 {
    	compatible = "nordic,nrf-twim";
    	status = "okay";
    	pinctrl-0 = <&i2c3_my_default>;
    	pinctrl-1 = <&i2c3_my_sleep>;
    	pinctrl-names = "default", "sleep";
    	zephyr,concat-buf-size = <257>;
        bmi270@68 {
                compatible = "bosch,bmi270";
                reg = <0x68>;
        };	
    };
    
    &uart20 {
        status = "disabled";
    };
    
    
    /* ---------------- BUZZER ---------------- */
     / {
        aliases {
            bmi270 = &bmi270;
    
        };
    
    };
    
    
    /*
    
    #include <zephyr/dt-bindings/pwm/pwm.h>
    
    / {
    	aliases {
    		pwm-led0 = &pwm_led2;
    	};
    
    	pwmleds {
    		compatible = "pwm-leds";
    
    		pwm_led2: pwm_led_2 {
    			pwms = <&pwm130 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
    		};
    	};
    };
    
    &pwm130 {
    	status = "okay";
    	pinctrl-0 = <&pwm130_default>;
    	pinctrl-1 = <&pwm130_sleep>;
    	pinctrl-names = "default", "sleep";
    };
    
    */

    Thanks and regards,

    Vinay

Children
No Data
Related