This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMP006 and I2C


I am using TMP006 interfaced to STM32.

The I2C generates the start , but after i send the slave address, i get acknowledgment failure from slave side. The slave device address I am using is 0x40

  I have pasted part of my code where i try to write data .

uint32_t I2C_WrData(uint8_t DevAddr, uint8_t RegAddr, uint32_t data){
  //Write a single byte data to the given register address
  //Generate a Start condition
  //Send I2C device Address and clear ADDR
  //(void) I2C1->SR2;      //EV6
  //Send Data
    I2C1->DR = data;  //EV8_1
  WaitSR1FlagsSet(I2C_SR1_BTF);  //wait till the data is actually written.
  //Generate Stop
  //Wait to be sure that line is idle
  return 0;