nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

I2C NAK issue : Tiva c 123gxl

Open shijogeorge24 opened this issue 8 months ago • 10 comments

I was working with the I2C sensor AS5048B. I encountered this error and tried different clock speeds and changed the I2C timeout settings, but the problem still exists.

tiva_i2c_transfer: I2C1: msgc=1 tiva_i2c_setclock: I2C1: frequency: 25 tiva_i2c_transfer: ERROR: I2C1 I2C error status: 0000002e tiva_i2c_transfer: I2C1: msgc=1 tiva_i2c_setclock: I2C1: frequency: 25 tiva_i2c_transfer: ERROR: I2C1 I2C error status: 0000002e wortiva_i2c_transfer: I2C1: msgc=1 tiva_i2c_setclock: I2C1: frequency: 25 tiva_i2c_transfer: ERROR: I2C1 I2C error status: 0000002e ld utiva_i2c_transfer: I2C1: msgc=1 tiva_i2c_setclock: I2C1: frequency: 25 tiva_i2c_transfer: ERROR: I2C1 I2C error status: 0000002e

I checked the driver code, and there is no reset option in the AS5048B driver or in QECoder. The TivaC I2C driver does not handle this error condition; it simply returns the error values. How can I solve this issue?

https://github.com/apache/nuttx/tree/master/drivers/i2c https://github.com/apache/nuttx/blob/master/arch/arm/src/tiva/common/tiva_i2c.c https://github.com/apache/nuttx/blob/master/arch/arm/src/tiva/tiva_i2c.h https://github.com/apache/nuttx/blob/master/drivers/sensors/as5048b.c https://github.com/apache/nuttx/blob/master/drivers/sensors/qencoder.c

Here, I am attaching the bus logic analyzer outputs. Screenshot 2024-06-06 202605 The device 0x43 was supposed to receive the data 0xFE and send the ACK for it, but this is missing.

shijogeorge24 avatar Jun 06 '24 14:06 shijogeorge24