I have attached a sensor board to the nRF5340DK board
I'm using zephyr 1.6.0 on macOS
I ran an I2C scan example using I2C1 peripheral and it works fine
found 5 I2C slave address
this is the main.c I used
#include <errno.h>
#include <zephyr.h>
#include <sys/printk.h>
#include <device.h>
#include <drivers/i2c.h>
void main(void)
{
const struct device *i2c_dev;
int i;
i2c_dev = device_get_binding("I2C_1");
if (!i2c_dev) {
printk("I2C: Device driver not found.\n");
return;
} else {
printk("I2C: Device driver found !!!!!!.\n");
}
for ( i = 4; i < 0x77; i++) {
struct i2c_msg msgs[1];
/* Send the address to read from */
msgs[0].buf = NULL;
msgs[0].len = 0;
msgs[0].flags = I2C_MSG_WRITE | I2C_MSG_STOP;
printk("0x%2x not found FOUND\n", i);
if (i2c_transfer(i2c_dev, &msgs[0], 1, i) == 0) {
printk("0x%2x FOUND\n", i);
}
}
}
&i2c1 {
compatible = "nordic,nrf-twim";
sda-pin = <8>;
scl-pin = <7>;
status = "okay";
};CONFIG_STDOUT_CONSOLE=y CONFIG_PRINTK=y CONFIG_I2C=y
&i2c3 {
compatible = "nordic,nrf-twim";
sda-pin = <8>;
scl-pin = <7>;
status = "okay";
};I changed also the proj.conf file
CONFIG_STDOUT_CONSOLE=y CONFIG_PRINTK=y CONFIG_I2C=y CONFIG_NRFX_TWIM=y CONFIG_NRFX_TWIM0=y CONFIG_NRFX_TWIM3=y
the I2C device driver was found but it doesn't find any I2C slave address
this the generated dts file
4555.zephyr.dts
what could be the problem with this behavior?

