This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

unable to obtain the binding of the I2C_2 bus on the asset_tracker project

Hello,

I am working on a custom NRF9160 and I am on SDK 1.3.0.
I am working on the asset_tracker project and I want to put my own accelerometer there.
To do this, I changed the accelerometer pins in the boards :

&i2c2 {
	compatible = "nordic,nrf-twim";
	status = "okay";
	sda-pin = <3>;
	scl-pin = <4>;	
};

To do this, I changed the accelerometer pins in the boards
and I added the use of i2c in prj.conf. :

# I2C
#CONFIG_I2C=y
#CONFIG_I2C_NRFX=y
#CONFIG_I2C_2=y
#CONFIG_I2C_2_NRF_TWIM=y

I also put the variable: CONFIG_ACCEL_USE_SIM = n

However, when I do device_get_binding ("I2C_2"); the variable remains null

Can someone help me?

Best regards,

Lecozahu

Related