AnsweredAssumed Answered

I2C KSDK driver send stop before writing data Buffer

Question asked by Cabha Rufus Baskar on Nov 30, 2015
Latest reply on Dec 5, 2015 by Jorge_Gonzalez

I am using Kinetis K64 with Processor Expert and running on RTOS with KSDK 1.2.0.

I am trying to write to the I2C Device(I2C port Expander) with the I2C_DRV_MasterSendDataBlocking function as per the KSDK sample example.


Looks at few instances I am running into a state where I get a return status of "kStatus_I2C_ReceivedNak" when i tried to Read/ Write a register of I2C device.

Here kStatus_I2C_ReceivedNak is received after I2C_HAL_WriteByte when I2C_DRV_SendAddress is called.


When I checked Through Saleae analyzer I came to know that the Stop bit is been issued before the Data is been written.

You can see in the below Image . The write 1 is success with start, adresss, cmd buffer , data buffer , stop


Analyzer log.png


Is this a known behavior? Please let me know what I am missing. Currently I have a Timeout of 1000ms.



Also I want to know,


if I2C_DRV_SendAddress get a kStatus_I2C_ReceivedNak Is it supposed to be handled in I2C_DRV_MasterSend ??