hi ,I am using nrf52840dk- nrf52840 board to interface the IMU Sensor using I2C using nrf connect sdk for vs code.
But I am facing error:
i'm using the code in ncs/samples/sensor/lsm6dso
here is prj.conf:
CONFIG_STDOUT_CONSOLE=y
CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_CBPRINTF_FP_SUPPORT=y
CONFIG_LSM6DSO_TRIGGER_GLOBAL_THREAD=y
CONFIG_LSM6DSO=y
here is thr overlay file:
&pinctrl {
i2c0_default: i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 26)>,
<NRF_PSEL(TWIM_SCL, 0, 27)>;
bias-pull-up;
};
};
i2c0_sleep: i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 26)>,
<NRF_PSEL(TWIM_SCL, 0, 27)>;
low-power-enable;
};
};
};
&i2c0 {
compatible = "nordic,nrf-twi";
status = "okay";
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
label = "I2C_0";
clock-frequency = <I2C_BITRATE_STANDARD>;
lsm6dso@6a {
compatible = "st,lsm6dso";
reg = <0x6a>;
};
};
the probleme is when i flash my code this the output :
*** Booting nRF Connect SDK v2.5.2 ***
Testing LSM6DSO sensor in trigger mode.
Could not set sensor type and channel
Testing LSM6DSO sensor in trigger mode.
Could not set sensor type and channel