Skip to content

Conversation

@joecrop
Copy link

@joecrop joecrop commented Sep 26, 2025

When an I2C target of the DUT is clock stretching, the I2C controller in this library samples SDA at the wrong time (well before the clock stretching is coplete. When this happens, the wrong read data is captured. The read data needs to be captured after the rising edge of SCL.
image

Copilot AI review requested due to automatic review settings September 26, 2025 21:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an I2C timing issue where the library samples SDA data before clock stretching is complete, resulting in incorrect read data capture. The fix moves the SDA data sampling to occur after the SCL rising edge.

  • Repositions SDA data sampling from before SCL rising edge to after clock stretching completion
  • Ensures proper I2C timing compliance when target devices perform clock stretching

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@joecrop joecrop changed the title Moved read bit data capture after SCL rising edge Allow for DUT Target to clock stretch Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant