I'm using a custom board that has nRF52810 and lis2dh12 sensor. The sensor's Vdd is powered from a GPIO (configured a regulator-fixed to supply power from the GPIO during boot time). GPIO's for I2C communications are configured with internal pull-ups. The code is same as lis2dh sample code.
For a while, the I2C communications to the sensor was working fine (RTT logged good sensor data), until the battery level went below 1.5V.
Now, the sensor is not acknowledging during lis2dh driver initialization in kernel's init.c (as if no supply is provided to the sensor). The issue persists after replacing the battery (with another battery and external power supply.
Could this be a simple timing issue during initialization?
[00:00:03.345,031] <inf> regulator_fixed: imu-pwr-ctrl onoff: 0
[00:00:09.659,393] <err> i2c_nrfx_twim: Error on I2C line occurred for message 0
[00:00:09.659,515] <err> lis2dhx: Failed to read chip id.
BTW, I inadvertently had added DC/DC configuration enabled (although the board has no external inductor to support DC/DC).