cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ 5, 3 & 1

yaga_3967241
New Contributor II

Hi,

For PSoC 5LP I2C component, how to get error status of I2C_MasterReadByte() API? The function returns the byte read from slave. However, if something goes wrong, how can I get the error status?

Thanks,

Winston

0 Likes
1 Solution
Krupashankar
Moderator
Moderator

Hi @yaga_3967241 ,

API - I2C_MasterStatus( ) 
Description: This function returns the master’s communication status.
Parameters: None
Return Value: Current status of the I2C master. Each constant is a bit field value. The value returned
may have multiple bits set to indicate the status of the transfer along with the generation of
error conditions.

Please refer to this datasheet for detailed explanation 

Component - I2C V3.50 Datasheet.pdf

You can also refer to the code example 

https://www.cypress.com/?rid=105713

 

Thanks,

Krupashankar

View solution in original post

0 Likes
1 Reply
Krupashankar
Moderator
Moderator

Hi @yaga_3967241 ,

API - I2C_MasterStatus( ) 
Description: This function returns the master’s communication status.
Parameters: None
Return Value: Current status of the I2C master. Each constant is a bit field value. The value returned
may have multiple bits set to indicate the status of the transfer along with the generation of
error conditions.

Please refer to this datasheet for detailed explanation 

Component - I2C V3.50 Datasheet.pdf

You can also refer to the code example 

https://www.cypress.com/?rid=105713

 

Thanks,

Krupashankar

View solution in original post

0 Likes