Dear Support,
We are trying to use Colibri VF50 1.2 B Colibri module with our device communicating through I2C.
We previously used Colibri VF50 1.2 A modules with this I2C device, it just worked fine.
My question is in TdxAllLibraries DLL the VybI2c_Read function has ever changed?
In details: We are using TdxAllLibraries DLL version 2.5.0.12527 (this is for VF50 1.2 B) for I2C communication and when calling VybI2c_Read function it will result timeout.
Before calling the above VybI2c_Read function first set with VybI2c_SetConfigInt the RegisterAddressSize.
If the “RegisterAddressSize = 0” it will result timeout.
If we call this read function with the „VF50 V1.2 A” module 1.7.3086 dll version we got successful respons, from this we conclude that the VybI2c_Read function has changed in this DLL version.
Our config:
“VF50 V1.2 A” factory config: I2C communication worked fine
• Bootloader : 1.3 for Colibri Built Jun 30 2016
• WIndows CE verion : 6.00
• VybGpio_GetVersion: 1.7.3272
• VybI2c_GetVersion : 1.7.3086
• latest compatible TdxAllLibraries DLL
“VF50 V1.2 B” factory config: the I2C communication fails
• Bootloader : 1.5 for Vybrid Built Dec 18 2017
• WIndows CE verion : 6.00
• VybGpio_GetVersion: 2.5.58538881
• VybI2c_GetVersion : 2.5.1806677427
• TdxAllLibraries DLL: 2.5.0.12527
Our code snippet calling VybI2c_Read fuction:
private static void CryptoIsDeviceAccessTest(IntPtr AIo, IntPtr AI2c)
{
DebugLine("");
DebugLine("CryptoIsDeviceAccessTest..");
uint cryptoAddress = 19;
byte[] buffer = new byte[] { 0 };
i2c_vyb.VybI2c_SetConfigInt(AI2c, RegisterAddressSize, 8, TdxCommon.ParamStorageType.StoreVolatile);
i2c_vyb.VybI2c_SetConfigInt(AI2c, RegisterAddress, 0, TdxCommon.ParamStorageType.StoreVolatile);
i2c_vyb.VybI2c_SetConfigInt(AI2c, SlaveAddress, cryptoAddress, TdxCommon.ParamStorageType.StoreVolatile);
bool success = i2c_vyb.VybI2c_Write(AI2c, buffer, (uint)buffer.Length) != i2c.I2C_RW_FAILURE;
if (success)
{
//i2c_vyb.VybI2c_SetConfigInt(AI2c, SlaveAddress, slaveAddress, TdxCommon.ParamStorageType.StoreVolatile);
i2c_vyb.VybI2c_SetConfigInt(AI2c, RegisterAddressSize, 0, TdxCommon.ParamStorageType.StoreVolatile);
if (i2c_vyb.**VybI2c_Read**(AI2c, buffer, (uint)buffer.Length) != i2c.I2C_RW_FAILURE) #THIS LINE WILL CAUSE TIMEOUT WITH VF50 V1.2 B CONFIG (if we use VF50 V1.2 A config it will respond successfully)
{
DebugLine(string.Format("** read data: {0:x2}", buffer[0]));
DebugLine("");
}
else
DebugLine(string.Format("** read error code: {0}", GetLastError()));
}
else
DebugLine(string.Format("** write error code: {0}", GetLastError()));
}
Thanks for checking,
Regards,
Marton