You are here

I2C reset | Cypress Semiconductor

I2C reset

Summary: 1 Reply, Latest post by aasi on 27 Feb 2012 12:54 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
Vytautas2's picture
36 posts


In SDK 1.0.0 release notes is mentioned the following known issue:

"When there is a failure in an I2C transaction, the I2C block needs to be reset. This can be done by invoking CyU3PI2cDeInit(), followed by a CyU3PI2cInit() and a CyU3PI2cSetConfig()."

If this is still an issue in mass-production FX3 and requires workaround, It would be great to see some working sample code that shows how to detect these failures that need reinitialization and how properly do this reinitialization.
If we use CyU3PI2cReceiveBytes and CyU3PI2cTransmitBytes, should we reinitialize I2C every time when these functions return CY_U3P_ERROR_FAILURE ?
CyU3PI2cReceiveBytes CY_U3P_ERROR_FAILURE - When a transfer fails;
CyU3PI2cTransmitBytes CY_U3P_ERROR_FAILURE - When a transfer is NAKed by the device;
aasi's picture
Cypress Employee
1166 posts

The error code would be CY_U3P_ERROR_TIMEOUT. This is the only case where the transfer has failed on the bus rather than the due to configuration.



Log in to post new comments.