How to get error status of I2C_MasterReadByte

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

cross mob
yaga_3967241
Level 3
Level 3
50 sign-ins 25 sign-ins 10 replies posted

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
Moderator
500 replies posted 50 likes received 25 likes received

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