regulator-powered sensor fails to acknowledge over i2c after replacing battery

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).

Parents
  • A hard fault was reported after powering up the board this morning.


    [00:00:00.004,211] <inf> regulator_fixed: lis2dh-pwr-reg onoff: 0
    [00:00:00.004,241] <err> os: ***** HARD FAULT *****
    [00:00:00.004,241] <err> os:   Debug event
    [00:00:00.004,272] <err> os: r0/a1:  0x00000000  r1/a2:  0x00000001  r2/a3:  0x00000001
    [00:00:00.004,272] <err> os: r3/a4:  0x0000cdc0 r12/ip:  0x00000002 r14/lr:  0x00005917
    [00:00:00.004,302] <err> os:  xpsr:  0x61000000
    [00:00:00.004,302] <err> os: Faulting instruction address (r15/pc): 0x0000549c
    [00:00:00.004,364] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
    [00:00:00.004,394] <err> os: Current thread: 0x200007a0 (main)
    [00:00:00.417,327] <err> fatal_error: Resetting system

    Afterwards, the log shows the original error message:


    [00:00:00.004,211] <inf> regulator_fixed: lis2dh-pwr-reg onoff: 0
    [00:00:00.004,394] <err> i2c_nrfx_twim: Error 0x0BAE0001 occurred for message 0
    [00:00:00.004,425] <err> lis2dh: Failed to read chip id.
    [00:00:00.004,486] <inf> logging_main: Checking for sensor
    [00:00:00.004,516] <inf> logging_main: Device lis2dh@19 is not ready

    As reported above, each <i2c_dump_msgs> entry in the drivers initialization has <z_arm_reset> and <z_arm_usage_fault>.

    I'm running a script that loops over "nrfjprog --recover" (not sure what to expect).

Reply
  • A hard fault was reported after powering up the board this morning.


    [00:00:00.004,211] <inf> regulator_fixed: lis2dh-pwr-reg onoff: 0
    [00:00:00.004,241] <err> os: ***** HARD FAULT *****
    [00:00:00.004,241] <err> os:   Debug event
    [00:00:00.004,272] <err> os: r0/a1:  0x00000000  r1/a2:  0x00000001  r2/a3:  0x00000001
    [00:00:00.004,272] <err> os: r3/a4:  0x0000cdc0 r12/ip:  0x00000002 r14/lr:  0x00005917
    [00:00:00.004,302] <err> os:  xpsr:  0x61000000
    [00:00:00.004,302] <err> os: Faulting instruction address (r15/pc): 0x0000549c
    [00:00:00.004,364] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
    [00:00:00.004,394] <err> os: Current thread: 0x200007a0 (main)
    [00:00:00.417,327] <err> fatal_error: Resetting system

    Afterwards, the log shows the original error message:


    [00:00:00.004,211] <inf> regulator_fixed: lis2dh-pwr-reg onoff: 0
    [00:00:00.004,394] <err> i2c_nrfx_twim: Error 0x0BAE0001 occurred for message 0
    [00:00:00.004,425] <err> lis2dh: Failed to read chip id.
    [00:00:00.004,486] <inf> logging_main: Checking for sensor
    [00:00:00.004,516] <inf> logging_main: Device lis2dh@19 is not ready

    As reported above, each <i2c_dump_msgs> entry in the drivers initialization has <z_arm_reset> and <z_arm_usage_fault>.

    I'm running a script that loops over "nrfjprog --recover" (not sure what to expect).

Children
No Data
Related