IIC Slave Address

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
658件の閲覧回数
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 解決策
438件の閲覧回数
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 返答(返信)
439件の閲覧回数
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 件の賞賛
438件の閲覧回数
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 件の賞賛