Also threre is another solution that may help you. Try to implement timeout detection by hardware. The SHFT2 flag from register I2Cx_SMB , indicate that the SDA is held low more than clock × LoValue / 512 .After detection you could implement the recovery procedure of the nine clock cycles . Please take a look at the reference manual chapter 31.3.9 I2C SMBus Control and Status register.
已解决! 转到解答。
Dear 梁 卓夫,
You are correct, part of the functionality provided by the I2Cx_SMB register is to detect when SCL and SDA lines are hang-up, using timeout flags and enabling related interrupts. The recovery of the bus still requires nine clock cycles, which is not a functionality provided by the register.
Have a great day,
Diego
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Dear 梁 卓夫,
You are correct, part of the functionality provided by the I2Cx_SMB register is to detect when SCL and SDA lines are hang-up, using timeout flags and enabling related interrupts. The recovery of the bus still requires nine clock cycles, which is not a functionality provided by the register.
Have a great day,
Diego
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------