MP9250 9-axis sensor using I2C stops working after sometime


#1
Hi I am using mangoh Red board RPI connector I2C interface to interface MPU9250-9axis sensor.

I am able to 
1) detect the I2C slave 
2) Read(single and multi byte also)/Write Registers.

Problem facing.
after  around 100 operations(read//write) I am facing NACKs from slave.
same code works on STM32 board and same sensor.

I ported code from: https://github.com/kriswiner/MPU9250/blob/master/AK8963_as_slave/AK8963Slave0_MPU9250_Ladybug.ino

can some one please help/guide me. 

***************************I2C log***********************
Nov 12 03:12:24 swi-mdm9x28 user.info Legato:  INFO | mpu9250[2708]/mpu9250Component T=main | main.cpp _mpu9250Component_COMPONENT_INIT() 97 | =============== I2C Reading & Writing application has started
Nov 12 03:12:24 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c EnableI2cBus() 223 | Enabling TCA9546A I2C switch...
Nov 12 03:12:24 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x75, data=0x71
Nov 12 03:12:24 swi-mdm9x28 user.info Legato:  INFO | mpu9250[2708]/mpu9250Component T=main | main.cpp _mpu9250Component_COMPONENT_INIT() 104 | I AM 0x71 ^M
Nov 12 03:12:24 swi-mdm9x28 user.info Legato:  INFO | mpu9250[2708]/mpu9250Component T=main | main.cpp _mpu9250Component_COMPONENT_INIT() 105 | I SHOULD BE 0x71 ^M
Nov 12 03:12:24 swi-mdm9x28 user.info Legato:  INFO | mpu9250[2708]/mpu9250Component T=main | main.cpp _mpu9250Component_COMPONENT_INIT() 111 | MPU9250 WHO_AM_I is 0x71 ^M
Nov 12 03:12:24 swi-mdm9x28 user.info Legato:  INFO | mpu9250[2708]/mpu9250Component T=main | main.cpp _mpu9250Component_COMPONENT_INIT() 112 | MPU9250 is online... ^M
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusWriteReg() 202 | SMBUS Write addr 0x69, reg=0x6b, data=0x80
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusWriteReg() 202 | SMBUS Write addr 0x69, reg=0x19, data=0x0
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusWriteReg() 202 | SMBUS Write addr 0x69, reg=0x1a, data=0x2
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusWriteReg() 202 | SMBUS Write addr 0x69, reg=0x1b, data=0x1
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusWriteReg() 202 | SMBUS Write addr 0x69, reg=0x1d, data=0x2
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusWriteReg() 202 | SMBUS Write addr 0x69, reg=0x1c, data=0x1
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x3b, data=0xe4
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x3c, data=0xa5
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x3d, data=0xfd
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x3e, data=0x8f
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x3f, data=0x37
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x40, data=0xd2
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x43, data=0xfe
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x44, data=0xc6
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x45, data=0xff
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x46, data=0x5a
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x47, data=0x0
Nov 12 03:12:25 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x48, data=0x4a
Nov 12 03:12:25 swi-mdm9x28 user.info Legato:  INFO | mpu9250[2708]/mpu9250Component T=main | main.cpp MPU9250SelfTest() 632 | ACCEL_XOUT_H,GYRO_XOUT_H,i0
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x3b, data=0xe4
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x3c, data=0x19
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x3d, data=0xfd
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x3e, data=0xa4
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x3f, data=0x37
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x40, data=0x8f
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x43, data=0xfe
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x44, data=0x92
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x45, data=0xfe
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x46, data=0xd6
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x47, data=0xfc
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x48, data=0x6a
Nov 12 03:12:26 swi-mdm9x28 user.info Legato:  INFO | mpu9250[2708]/mpu9250Component T=main | main.cpp MPU9250SelfTest() 632 | ACCEL_XOUT_H,GYRO_XOUT_H,i1
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x3b, data=0xe4
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x3c, data=0x8b
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x3d, data=0xfd
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x3e, data=0xa9
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x3f, data=0x37
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x40, data=0x9b
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x43, data=0xfd
Nov 12 03:12:26 swi-mdm9x28 user.debug Legato:  DBUG | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 159 | SMBUS READ bus=0x4 addr=0x69, reg=0x44, data=0x72
Nov 12 03:12:26 swi-mdm9x28 user.err kernel: [  428.869106] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
Nov 12 03:12:26 swi-mdm9x28 user.err Legato: =ERR= | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 153 | smbus read failed with error -1 Reg:0x45
Nov 12 03:12:26 swi-mdm9x28 user.err kernel: [  428.896811] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
Nov 12 03:12:26 swi-mdm9x28 user.err Legato: =ERR= | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 153 | smbus read failed with error -1 Reg:0x46
Nov 12 03:12:26 swi-mdm9x28 user.err kernel: [  428.924352] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
Nov 12 03:12:26 swi-mdm9x28 user.err Legato: =ERR= | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 153 | smbus read failed with error -1 Reg:0x47
Nov 12 03:12:26 swi-mdm9x28 user.err kernel: [  428.952656] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
Nov 12 03:12:26 swi-mdm9x28 user.err Legato: =ERR= | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 153 | smbus read failed with error -1 Reg:0x48
Nov 12 03:12:26 swi-mdm9x28 user.info Legato:  INFO | mpu9250[2708]/mpu9250Component T=main | main.cpp MPU9250SelfTest() 632 | ACCEL_XOUT_H,GYRO_XOUT_H,i2
Nov 12 03:12:26 swi-mdm9x28 user.err kernel: [  429.082340] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
Nov 12 03:12:26 swi-mdm9x28 user.err Legato: =ERR= | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 153 | smbus read failed with error -1 Reg:0x3b
Nov 12 03:12:26 swi-mdm9x28 user.err kernel: [  429.109580] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
Nov 12 03:12:26 swi-mdm9x28 user.err Legato: =ERR= | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 153 | smbus read failed with error -1 Reg:0x3c
Nov 12 03:12:26 swi-mdm9x28 user.err kernel: [  429.137766] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
Nov 12 03:12:26 swi-mdm9x28 user.err Legato: =ERR= | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 153 | smbus read failed with error -1 Reg:0x3d
Nov 12 03:12:26 swi-mdm9x28 user.err kernel: [  429.165339] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
Nov 12 03:12:26 swi-mdm9x28 user.err Legato: =ERR= | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 153 | smbus read failed with error -1 Reg:0x3e
Nov 12 03:12:26 swi-mdm9x28 user.err kernel: [  429.192616] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
Nov 12 03:12:26 swi-mdm9x28 user.err Legato: =ERR= | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 153 | smbus read failed with error -1 Reg:0x3f
Nov 12 03:12:26 swi-mdm9x28 user.err kernel: [  429.219881] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
Nov 12 03:12:26 swi-mdm9x28 user.err Legato: =ERR= | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 153 | smbus read failed with error -1 Reg:0x40
Nov 12 03:12:27 swi-mdm9x28 user.err kernel: [  429.348530] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
Nov 12 03:12:27 swi-mdm9x28 user.err Legato: =ERR= | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 153 | smbus read failed with error -1 Reg:0x43
Nov 12 03:12:27 swi-mdm9x28 user.err kernel: [  429.376978] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
Nov 12 03:12:27 swi-mdm9x28 user.err Legato: =ERR= | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 153 | smbus read failed with error -1 Reg:0x44
Nov 12 03:12:27 swi-mdm9x28 user.err kernel: [  429.405248] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
Nov 12 03:12:27 swi-mdm9x28 user.err Legato: =ERR= | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 153 | smbus read failed with error -1 Reg:0x45
Nov 12 03:12:27 swi-mdm9x28 user.err Legato: =ERR= | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 153 | smbus read failed with error -1 Reg:0x46
Nov 12 03:12:27 swi-mdm9x28 user.err kernel: [  429.435297] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x011363c8 OPER:0x00000010
Nov 12 03:12:27 swi-mdm9x28 user.err kernel: [  429.461684] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
Nov 12 03:12:27 swi-mdm9x28 user.err Legato: =ERR= | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 153 | smbus read failed with error -1 Reg:0x47
Nov 12 03:12:27 swi-mdm9x28 user.err kernel: [  429.489108] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
Nov 12 03:12:27 swi-mdm9x28 user.err Legato: =ERR= | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 153 | smbus read failed with error -1 Reg:0x48
Nov 12 03:12:27 swi-mdm9x28 user.info Legato:  INFO | mpu9250[2708]/mpu9250Component T=main | main.cpp MPU9250SelfTest() 632 | ACCEL_XOUT_H,GYRO_XOUT_H,i3
Nov 12 03:12:27 swi-mdm9x28 user.err kernel: [  429.621421] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
Nov 12 03:12:27 swi-mdm9x28 user.err Legato: =ERR= | mpu9250[2708]/mpu9250Component T=main | util.c SmbusReadReg() 153 | smbus read failed with error -1 Reg:0x3b

****************************END I2C log********************

#2

What does the scope show when you are receiving NACKs? Does everything (MOSI/MISO/SCK/CS) look ok?


#3

I am using I2C Not SPI,
Regarding Scope: I ran scope during NACK time, i see blank, no data no clk.


#4

SO, on your scope/analyser, have you compared the two?

Have you managed to capture the point at which the mangOH “stop working” ?


#5
Thanks for the reply,

I know the place where it stops, In mangoh It stops at during SelfTest ; which requires around 200 + 200 read of GYRO and ACCEL regs data for self test  completion.

This is the place where it fails (after around 20 iterations which is just reading 6 registers no thing else.)  or starts getting NACK i.e in scope i see nothing but blank,No clk and no data.
I also introduced some delays like 100ms but no use.

Is I2C mux stopped working  ? . I do not know how to proceed further any help or pointers are much appreciated.

#6

Hey @epsragh,

Would it be possible to see the output from dmesg | grep i2c? We faced issues regarding the i2c data line getting stuck low (see GPIO stops working after several hours) resulting in a “bus busy” error from the Qualcomm i2c driver in the kernel log. We never really found a conclusive answer either. In general, cutting down on i2c traffic seemed to do the trick (i.e no polling).

Also, which module are you using? We’ve been testing with a WP85 on release 15 firmware and a fork of Legato 18.04.0. I have yet to test release 16 of the WP85 firmware but I’m optimistic that it could improve i2c performance.


#7
Thanks for the reply,
dmesg
****************************************************
[  100.980139] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
[  108.031943] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
[  118.047108] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
[  128.056173] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
[  138.071834] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
[  148.083726] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
[  158.092871] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x69 MSTR_STS:0x0d1300c8 OPER:0x00000010
[  193.284306] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:1 cur:0 tx) bc(rx:0 tx:2) mode:FIFO slv_addr:0x3a MSTR_STS:0x0c1300c8 OPER:0x00000090
*****************************************************
cm info---------------------

Device:                        WP7608
IMEI:                          352913090103092
IMEISV:                        4
FSN:                           XG814285190310
Firmware Version:              SWI9X07Y_02.16.02.00 000000 jenkins 2018/04/19 19:59:02
Bootloader Version:            SWI9X07Y_02.16.02.00 000000 jenkins 2018/04/19 19:59:02
MCU Version:                   002.007
PRI Part Number (PN):          9907762
PRI Revision:                  001.002 
Carrier PRI Name:              GENERIC
Carrier PRI Revision:          002.032_000
SKU:                           1103788
Last Reset Cause:              Power Down
Resets Count:                  Expected: 127	Unexpected: 3
root@swi-mdm9x28:~# app info mpu9250 
mpu9250
  status: stopped
  app.name: mpu9250
  app.md5: 2409f44378009037c4c676ad7c882caf
  app.version: 1.0
  legato.version: 18.07.0

------------------------------------------------------------------
I am getting this Error   within 10s of  operation start.
   One thing I observed , When ever the NACK comes, if I  re-enable the I2C bus, it works fine, probably it is resetting ( I am not able to calibrate)the I2C sensor.
void Re_EnableI2cBus
(
void
)
{
uint8_t data;
if(i2cdev_fd > 0){
  close(i2cdev_fd); 
}
LE_DEBUG("Re Enabling TCA9546A I2C switch...");
const int i2cBus = 4;
i2cdev_fd = I2cAccessBusAddr(i2cBus, 0x71);
LE_FATAL_IF(i2cdev_fd == LE_FAULT, "failed to open i2cbus %d", i2cBus);
const uint8_t enableAllPorts = 0xff;
LE_FATAL_IF(i2c_smbus_write_byte(i2cdev_fd, enableAllPorts) == -1, "failed to write i2c data");
 // Read WHO_AM_I register for MPU-9250
LE_DEBUG("!!!!!!!!!!!WHO_AM_I 0x%x\n",SmbusReadReg(0x4, 0x69,0x75,&data));
}

please let me know anything that i can try to resolve this .


#8

Why do you keep formatting your posts as code?
It makes them hard to read - as they don’t wrap to the window.

So how does that compare to your STM32 case?

So zoom in on that - what, exactly, is happening? How does it compare to the STM32 case?

Have you looked at the mangOH schematics for places to probe?

So lots of I2C traffic, then.

sounds like a thing to try …


#9

Hey all,

Unfortunately I don’t think this is the same behaviour or errors we saw. I’ll be sure to keep an eye on this post and share anything I may find.

Best of luck!


#10

STM32 keeps working It never stops or give any Error,
In mangoH board , as I said all of a sudden no clk and no data(when NACK msg starts)


#11

STM works perfectly fine same code , always I see clk and data line but not in MangoH board.


#12

I am getting NACK for around 20 r/w operations . what else can I do.


#13

I will look into it.