Multiple slave I2C

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MiSa_288856
Level 1
Level 1

Hallo,

   

I have a doubt about handling a communication with a couple of I2C slaves. If I usually perform:

   

a write on the first slave, a read from the first slave, a write to the second slave, a read from the second slave

   

If one of that functions takes too much time I simply skip on the next task simply clearing the read/write status.

   

The question is: "I have to send a stop the the slave before dropping the task I was executing with him"?

0 Likes
1 Reply
MR_41
Employee
Employee
First like received

Clearing the Read or Write status will not work if the Slave did not respond. Once you initiate an read or write on the I2C bus, if there is an error on the bus like the slave not ready, you will have to stop and start the I2C hardware.

   

 

   

You can avoid this restarting operation by checking if the slave is ready by using the I2C low level API fSendStart and initiate the read or write only if the slave is active.  Check out the below forum post where a similar issue is discussed.

   

 

   

http://www.cypress.com/?app=forum&id=1573&rID=50008

   

 

   

Best Regards,

   

Ganesh

   

The PSoC Hacker

0 Likes