IIC Slave Address

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

IIC Slave Address

跳至解决方案
664 次查看
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 项奖励
1 解答
444 次查看
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 项奖励
2 回复数
445 次查看
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 项奖励
444 次查看
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 项奖励