Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support responder clock stretching when Rx FIFO full #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

incanus
Copy link

@incanus incanus commented Oct 12, 2022

This adds (optional) support for responder-side clock stretching when the Rx FIFO is full.

A good explanation of the feature is here:

While control of the SCL line is the domain of the I2C master, an optional feature of the protocol allows slaves to temporarily control it to slow down transmission before it is ready to accept more data.

To stretch the clock, the slave device simply holds the SCL line down. In that state, the master device must wait for the clock rises back up to high before resuming transmission.

@incanus
Copy link
Author

incanus commented Oct 12, 2022

Here's a bit more from the Pi forums related to the C equivalent:

This instructs DW_apb_i2c to hold SCL low while the RX FIFO is full, preventing the master from transmitting more bytes (and overrunning the FIFO) until the ISR has time to handle things.

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