this is more of a zephyr question than anything else but I thought I would ask to see if anyone had any ideas. I have a board that is using a xiao nrf52840 with a adxl345 hooked up to the i2c pins. in the device tree I am able to create the device and then find said device in a c file. but when I try to actually use that device it gives me a communication error which implies to me that the device tree is not set up correctly. I am able to connect to the adxl345 in a normal arudino script so I know it is not a wiring problem. I also know the adxl345 is at address 53. so that shoudl be good as well. other than that I am unsure. I will paste it below to see if anyone has any ideas. again I know this isn' the exact right place to put this but I am at a loss.
&i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 4)>,
<NRF_PSEL(TWIM_SCL, 0, 5)>;
};
};
&i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 4)>,
<NRF_PSEL(TWIM_SCL, 0, 5)>;
low-power-enable;
};
};
&i2c1 {
pinctrl-0 = <&i2c0_default>;
compatible = "nordic,nrf-twi";
reg = <0x40003000 0x1000>;
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
adxl345: adxl345@53 {
compatible = "adi,adxl345";
reg = <0x53>; /* Device address on I2C bus */
};
};