- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use I2CMasterSendStop() function, but from time to time (not always) my program hangs in this infinite (for any reason) loop:
........
while(!SHT_CHECK_INTR_MASTER(SHT_INTR_MASTER_I2C_STOP |
SHT_INTR_MASTER_I2C_ARB_LOST |
SHT_INTR_MASTER_I2C_BUS_ERROR))
{
/* Wait until Stop has been generated */
}
.........
What is the reason to have such a while ?
How can I avoid this problem?
Thank you
P
- Labels:
-
PSoC 4 Architecture
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Do you have the I2C slave connected when the issue is happening? Which is your I2C slave?
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Yes, I have. It is SHT31 (humidity sensor). The problem I see is that SCL line stays low and I do not know who does pull down.
When I communicate with *ReadBuf* , it is working, but when I try with separate start, read, stop functions, something is wrong and it hangs. My problem is not that something is wrong, my problem is that the driver is written in such a way, that it hangs and I am not sure if I have to use cypress drivers and systems, because I do not know in how many places they have used this so "bright" idea to place infinite while.
Thank you