processor expert i2c SendBlock size

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

processor expert i2c SendBlock size

ソリューションへジャンプ
1,361件の閲覧回数
zohargolan1
Contributor II

Hi All,

Is there a way to send a message with no payload, only the address?

Some devices (like the LTC2451), requires only the address with out any data, for the reading of the adc value.

If I am using size of 0 the SendBlock will return immediately and will do nothing.

Please advise

Zohar

1 解決策
1,125件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello zohar golan:

Please mention the MCU part number. Are you using I2C_LDD?

I am not familiar with that device in particular (LTC2451), but the first transferred byte involves the address and a R/W bit to indicate the operation. If you are expecting to "read" values from such I2C slave, then you better use MasterReceiveBlock() with the number of bytes you are expecting to read. This will then send the Address + Read bit and prepare to receive bytes from the slave.

If the slave really just needs a dummy address, then I don't think that case is covered by Processor Expert I2C_LDD component, so you need to create your own API for this, it should be pretty simple.

If your MCU is from Kinetis family, I can also recommend you to check if it is already supported by KSDK platform and migrate your project. You can see the supported devices in the release notes.

Regards!

Jorge Gonzalez

元の投稿で解決策を見る

2 返答(返信)
1,126件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello zohar golan:

Please mention the MCU part number. Are you using I2C_LDD?

I am not familiar with that device in particular (LTC2451), but the first transferred byte involves the address and a R/W bit to indicate the operation. If you are expecting to "read" values from such I2C slave, then you better use MasterReceiveBlock() with the number of bytes you are expecting to read. This will then send the Address + Read bit and prepare to receive bytes from the slave.

If the slave really just needs a dummy address, then I don't think that case is covered by Processor Expert I2C_LDD component, so you need to create your own API for this, it should be pretty simple.

If your MCU is from Kinetis family, I can also recommend you to check if it is already supported by KSDK platform and migrate your project. You can see the supported devices in the release notes.

Regards!

Jorge Gonzalez

1,125件の閲覧回数
zohargolan1
Contributor II

Hi Jorge,

Thank you for your reply, seems like this function does the trick. The device I am using is MK20FX512VMD12.

I was using function call CI2C1_RecvBlock , which apparently is doing similar things.

Zohar

0 件の賞賛
返信