You are here

I2C Reset PSoC Creator 3.3 | Cypress Semiconductor

I2C Reset PSoC Creator 3.3

Summary: 1 Reply, Latest post by Bob Marlowe on 29 Jan 2016 05:31 AM PST
Verified Answers: 1
Last post
Log in to post new comments.
cyguevara_1509311's picture
18 posts

Hi everyone,


I had a similar situation to the topic posted here:

​I'm trying to communicate with an I2C device but sometimes the device is hung up, (SDA low), and it doesn't work until I turn off the power, I was trying to use teh directives of the previous post, but the new component doesn't include them.


    while(I2C_1_sda_Read() == 0) // SDA hang low
        I2C_1_SET_I2C_SCL_HSIOM_SEL(I2C_1_HSIOM_GPIO_SEL); //Switch to GPIO    
        I2C_1_SET_I2C_SCL_HSIOM_SEL(I2C_1_HSIOM_I2C_SEL); //Switch to Component


Is there another way to reset the I2C bus and get out from the infinite loop (Waiting ACK or NACK) in case the device got hung in the middle of the program?

user_1377889's picture
9273 posts

I have seen solutions to pull down the sda low for 9 or more clock cycles. This will be seen by "hanging" slaves as a lost arbitration and will release the bus cancelling current transmission. There is a generated file.h for the sda pin. Use those functions to access the pin directly.

When starting a master-slave communication, try to check the result from I2C_SendStart() and in case of error do no further access.



Log in to post new comments.