Skip to main content
Jseyn.1
Associate III
January 10, 2022
Question

STM32F1xx smbus send address no ack?

  • January 10, 2022
  • 6 replies
  • 1835 views

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?

This topic has been closed for replies.

6 replies

Bubbles
ST Employee
January 10, 2022

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
January 10, 2022

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""."
Tesla DeLorean
Guru
January 10, 2022

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
Jseyn.1
Jseyn.1Author
Associate III
January 11, 2022

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
Jseyn.1Author
Associate III
January 25, 2022

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
Jseyn.1Author
Associate III
January 26, 2022

Hey,

Thankyou for the slience, i gotta it.

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

0693W00000JNKN2QAP.png