I2C Reset PSoC Creator 3.3 | Cypress Semiconductor
I2C Reset PSoC Creator 3.3
I had a similar situation to the topic posted here: http://www.cypress.com/forum/psoc-4-architecture/reset-i2c
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?