I have tried all the configs on device tree to make the sensor work reliably, but it fails. Like I have LSM6DSOX as IMU and it works for sometime and then On power on reset , device starts to show as not ready
device_is_ready(lsm_i2c.bus) this fails.
Providing config files and schematic of the SDA and SCL line-
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
&i2c0 {
lsm6dsox: lsm6dsox@6A {
compatible = "st,lsm6dso";
reg = <0x6A>;
};
stc3117: stc3117@70 {
compatible = "i2c-device";
reg = <0x70>;
};
mlx60732: mlx60732@3A {
compatible = "i2c-device";
reg = <0x3A>;
};
};
&i2c1 {
status = "okay";
maxm86161: maxm86161@62 {
compatible = "i2c-device";
reg = <0x62>;
};
And this is pin ctrl config for the same -
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
* Copyright (c) 2022 Nordic Semiconductor
* SPDX-License-Identifier: Apache-2.0
*/
&pinctrl {
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 6)>,
<NRF_PSEL(UART_RTS, 0, 5)>;
};
group2 {
psels = <NRF_PSEL(UART_RX, 0, 8)>,
<NRF_PSEL(UART_CTS, 0, 7)>;
bias-pull-up;
};
};
uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 6)>,
Strangely there is one more sensor on the same line and that sensor is working properly with this configuration. I have been using the same sensor and same hardware which was working on nrf5 SDK and recently ported the project to NCS 2.2.0.
Please help in resolving this