It works when I use I2C_2 to communicateon nrf9160. The register value is successfully accessed when i2C_reg_write_byte() is called.

9160dk_9160ns.overlay:
&i2c2 {
status = "okay";
sda-pin = <0>;
scl-pin = <1>;
clock-frequency = <400000>;
da270@26 {
compatible = "mir,da270";
reg = <38>;
label = "DA270";
int-gpios = <&gpio0 2 0>;
};
};
I want to change I2C2 to I2C1.
Modified overlay:
&i2c1 {
compatible = "nordic,nrf-twim";
status = "okay";
sda-pin = <0>;
scl-pin = <1>;
clock-frequency = <400000>;
da270@26 {
compatible = "mir,da270";
reg = <38>;
label = "DA270";
int-gpios = <&gpio0 2 0>;
};
};
&uart1 {
status = "disabled";
};
The following error occurs when i2C_reg_write_byte() is called to access the same register of the slave machine:

The code is the same and I haven't changed it. Why is this a problem?

