cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F1xx smbus send address no ack?

Jseyn.1
Associate III

my smbus device is a temperature sensor (TMP100).MCU is STM32F103RBT6

when i wrote a word to slave as following:

I2C_GenerateSTART(SMBus_NAME, ENABLE);

while(!I2C_CheckEvent(I2C2,I2C_

I2C_Send7bitAddress(SMBus_NAME, slaveAddr, I2C_Direction_Transmitter);

while(!I2C_CheckEvent(I2C2,I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED)){;}

I2C_SendData(I2C2,addr);// device registor address

the registor I2C2->SR1 : 0x4400. due to the smbus line nack.. how to solve it?

6 REPLIES 6
Bubbles
ST Employee

Hi, what is the configured bus speed?

Do you have a scope to observe the SMBUS line?

The nack can be anything, best if you can use a scope or at least logic analyzer to observe.

BR,

J

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

TDK
Guru

If the slave does not ACK, there is likely a hardware issue and/or you are using the incorrect slave address. Your code doesn't contain enough information to determine the latter. Note that slave addresses should be left-aligned.

If you feel a post has answered your question, please click "Accept as Solution".

https://www.ti.com/lit/ds/symlink/tmp100.pdf?ts=1641822742177

Slave Address (Table 2)

1001000 -> 0x90

1001001 -> 0x92

1001010 -> 0x94

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Jseyn.1
Associate III

0693W00000HrAyPQAV.pngI recheck my slave address 0x48, as TDK said the slave address left-aligned(0x90). smbus clock is 100khz. I2C_SendData(I2C2,addr) failed, the smbdata line sholud be low,but no changes.

Jseyn.1
Associate III

hi ,

about the SMBus Alert response , gotta dizzy. could u tell the timing? as the smbhost send 0x18 or 0x19 gotta no ack

0693W00000JNBqyQAH.png 

Jseyn.1
Associate III

Hey,

Thankyou for the slience, i gotta it.

smhost to request the slave addres & status when the alert pin active.

0693W00000JNKN2QAP.png