Hello Gaurav Banyal,
How many I2C devices you connect in the I2C bus?
When the problem happens, did you check the I2C bus wave, whether there has some other I2C device influence the I2C wave?
Please also attached the I2C wave, thank you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------