CyU3PI2cTransmitBytes returns without completion

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

cross mob
Anonymous
Not applicable

We are using register mode for I2C write. Documentation says that in this mode all APIs are blocking which means they return when the transaction is complete. But we are observing that CyU3PI2cTransmitBytes returns back prior to completion of the transaction i.e before the stop bit. Also if single byte is written CyU3PI2cTransmitBytes returns even much earlier.

   

Is it a known issue?

   

Thanks,

   

Sandeep

0 Likes
2 Replies
Anonymous
Not applicable

How are you timing the execution time of the code and the completion of the transfer i.e. the occurence of stop bit is on the physical line and the returning of the API is code execution. How are you timing the 2?

   

Regards,

   

Anand

0 Likes
Anonymous
Not applicable

Can it be that your SCL and SDA lines are driven to an invalid state from externally? I had a similar issue and then found that the SCL and SDA lines got driven to 1.25 V by a faulty hardware.

   

 

   

Maybe also worth checking the return values of your I2C init function.

   

 

   

-Silvio

0 Likes