nRF52840DK SPI Issues

I was in the process of evaluating a driver when I noticed I2C communication was not working as expected.  I put a probe on the relevant pins and noticed the Voltage on my SCL pin looks like it is misconfigured or being pulled down by something.

SPI Bus Capture

I am using the nRF52840DK for testing and ran this without nothing attached to verify none of my wiring was the cause.  The overlay file I am using is very simple it is just:

&arduino_i2c {
	status = "okay";
	bmp585@47 {
		compatible = "bosch,bmp585";
		int-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
		status = "okay";
		reg = <0x47>;
	};

	clock-frequency = <I2C_BITRATE_STANDARD>;
};

This means that my I2C bus should be: SCL = P0.26 & SDA = P0.27.  If anyone has seen this behavior before or has any suggestions let me know.

Parents
  • Hello,

    The I²C bus requires pull‑up resistors. The nRF internal pulls are disabled by default; you must either:

    • Use external pull‑ups, or
    • Enable internal pull‑ups in the pinctrl for the I2C instance.

    In our default device tree of nRF52840 internal bias pull up is not enabled. If you don't have external pull up resistor in your design, you have to make it enabled in the device tree. 

    &pinctrl {
        i2c0_default: i2c0_default {
            group1 {
                psels = <NRF_PSEL(TWIM_SDA, 0, 27)>,
                        <NRF_PSEL(TWIM_SCL, 0, 26)>;
                bias-pull-up;
            };
        };
    
        i2c0_sleep: i2c0_sleep {
            group1 {
                psels = <NRF_PSEL(TWIM_SDA, 0, 27)>,
                        <NRF_PSEL(TWIM_SCL, 0, 26)>;
                low-power-enable;
            };
        };
    };
    
    &arduino_i2c {
        status = "okay";
        pinctrl-0 = <&i2c0_default>;
        pinctrl-1 = <&i2c0_sleep>;
        pinctrl-names = "default", "sleep";
    };

Reply
  • Hello,

    The I²C bus requires pull‑up resistors. The nRF internal pulls are disabled by default; you must either:

    • Use external pull‑ups, or
    • Enable internal pull‑ups in the pinctrl for the I2C instance.

    In our default device tree of nRF52840 internal bias pull up is not enabled. If you don't have external pull up resistor in your design, you have to make it enabled in the device tree. 

    &pinctrl {
        i2c0_default: i2c0_default {
            group1 {
                psels = <NRF_PSEL(TWIM_SDA, 0, 27)>,
                        <NRF_PSEL(TWIM_SCL, 0, 26)>;
                bias-pull-up;
            };
        };
    
        i2c0_sleep: i2c0_sleep {
            group1 {
                psels = <NRF_PSEL(TWIM_SDA, 0, 27)>,
                        <NRF_PSEL(TWIM_SCL, 0, 26)>;
                low-power-enable;
            };
        };
    };
    
    &arduino_i2c {
        status = "okay";
        pinctrl-0 = <&i2c0_default>;
        pinctrl-1 = <&i2c0_sleep>;
        pinctrl-names = "default", "sleep";
    };

Children
No Data
Related