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

Hello

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
    I2C_GenerateSTART(I2C1,ENABLE);
 
  //Send I2C device Address and clear ADDR
I2C_Send7bitAddress(I2C1,DevAddr,I2C_Direction_Transmitter);
  //(void) I2C1->SR2;      //EV6
 
  //Send Data
    I2C1->DR = data;  //EV8_1
  WaitSR1FlagsSet(I2C_SR1_BTF);  //wait till the data is actually written.
 
  //Generate Stop
I2C_GenerateSTOP(I2C1,ENABLE);
 
  //Wait to be sure that line is idle
  WaitLineIdle();
 
  return 0;
}