processor expert i2c SendBlock size

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

processor expert i2c SendBlock size

Jump to solution
702 Views
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 Solution
466 Views
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

View solution in original post

2 Replies
467 Views
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

466 Views
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 Kudos