I am trying to communicate with the Barometric sensor MS 5611, using the I2C protocol. My micro is STM32f3discovery. The address of the sensor is send, but not the command. The code is stucked in the while loop waiting for TXIE bit to be set. The problem which I am struggling is that I don’t get the acknowledge bit from the sensor. The TI2C status register is setting the NACK (not acknowledge), STOPF (stop flag) bit. On other hand, the same code is used for I2c communication on stm32 accelometers L3GD20 and it works perfectly fine.
-Could the problem be in giving the wrong parameters for the timing register? I have used the table for the examples of timing settings in the reference manual.
- -The I2C is a very general communication protocol and could the acknowledge bit have a different definition, if compared between MS 5611 and L3GD20?
The adress of the sensor is:
#define ADDR_W 0xEC // device address + write mode
O-scope -> barometric sensor: