2022-01-10 03:55 AM
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?
2022-01-10 04:02 AM
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.
2022-01-10 10:01 AM
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.
2022-01-10 11:48 AM
https://www.ti.com/lit/ds/symlink/tmp100.pdf?ts=1641822742177
Slave Address (Table 2)
1001000 -> 0x90
1001001 -> 0x92
1001010 -> 0x94
2022-01-10 05:48 PM
I 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.
2022-01-24 11:50 PM
hi ,
about the SMBus Alert response , gotta dizzy. could u tell the timing? as the smbhost send 0x18 or 0x19 gotta no ack
2022-01-25 06:47 PM
Hey,
Thankyou for the slience, i gotta it.
smhost to request the slave addres & status when the alert pin active.