Reputation: 1064
I'm a beginner. I'm trying to understand about I2C Initialization of TMP102. It is a temperature sensor. It is connected via I2C. So, the initialization must be of I2C. But, my leader told we have to initialize GPIO also in this case, since interrupt pin is connected via GPIO. He also told it is not necessary in other cases. I couldn't understand the original purpose.
Why do we initialize GPIO? In other cases, where does the slave's interrupt pin gets connected?(if not in GPIO)
Also, in case of large message, TX/RX FIFO may not fit. So, draining feature is used (XDR/RDR bit is set). What exactly is draining feature and what it does?
Upvotes: 0
Views: 471
Reputation: 4255
Why do we initialize GPIO?
Since interrupt pin is connected via GPIO.
In other cases, where does the slave's interrupt pin gets connected?
If slave has an interrupt pin, you SHOULD initialize corresponding GPIO/IOMUX.
Some slave devices may not contain interrupt. In that case, no need to initialize any GPIO.
Summary:
You should initialize ALL GPIO/IOMUX for all input/output from processor to slave device.
Upvotes: 1