I am reading BMP180 pressure sensor on STM32 and well, it works, but, watching the transfer on the analyzer I can always see an extra empty byte read.
I am almost sure, it is because I give the I2C_GenerateSTOP() only after I I2C_ReceiveData() - this is kind of logical, but not as all the examples go. There, you call I2C_GenerateSTOP() even before waiting for the I2C_EVENT_MASTER_BYTE_RECEIVED of the last byte.
Now, if I do as the examples go, the readout is not stable: it works few times, then does not anymore: wait for I2C_EVENT_MASTER_MODE_SELECT after I2C_GenerateSTART() times out.
I tried to search various examples but was not able to find any clue how to resolve this.
Could anybody help ?