AnsweredAssumed Answered

HAL_I2C_Mem_Read reads only correct if the parameter is wrong

Question asked by Osto on Sep 24, 2014
Latest reply on Sep 26, 2014 by gonzalez.laurent
Hi,
I have a STMCube generated project wirh I2C memory 24LC512 with following problem. The line:
Status = HAL_I2C_Mem_Read(&hi2c1, IIC_ADDRESS+1, 0, I2C_MEMADD_SIZE_8BIT, pNVRawData, NVRawDataLen, 1000);
is correct feeded with parameter but reads only 0xff as data.

The line:
Status = HAL_I2C_Mem_Read(&hi2c1, IIC_ADDRESS+1, 0, I2C_MEMADD_SIZE_8BIT+5, pNVRawData, NVRawDataLen, 1000);

is not correct because of "+5" (any garbage) but is working correct and reads correct value.
I'm using newest Cube & FW.

Why?
Whats wrong?

Outcomes