IIC Slave Address

cancel
Showing results for 
Search instead for 
Did you mean: 

IIC Slave Address

Jump to solution
377 Views
overdamped
Contributor II

I'm trying to interface with a freescale sensor as per AN4481, but it seems under processor expert for the k60 that a multi-byte write that i2c always transmits the slave address before each byte (the 3rd and 4th starts in the photo are the multibyte write). Is there any way to avoid this other than bitbanging spi or is the IIC k60 peripheral designed to perform this way?

i2c_pex_MultibyteWrite.jpg

0 Kudos
1 Solution
157 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello overdamped:

Can you share your code?

To avoid K60 sending the I2C slave address again, you have to use a unique call to the MasterSendBlock() method, considering that the total size of the block includes in this case the sensor's "Register Address" and all the "Bytes to Write".


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
158 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello overdamped:

Can you share your code?

To avoid K60 sending the I2C slave address again, you have to use a unique call to the MasterSendBlock() method, considering that the total size of the block includes in this case the sensor's "Register Address" and all the "Bytes to Write".


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
157 Views
overdamped
Contributor II

Correct you are. Figured out my size parameter to the _MasterSendBlock function was incorrect. Thanks for the tip in the right direction.

0 Kudos