Skip to content

support responder clock stretching when Rx FIFO full#5

Open
incanus wants to merge 1 commit into
epmoyer:mainfrom
incanus:clock-stretching
Open

support responder clock stretching when Rx FIFO full#5
incanus wants to merge 1 commit into
epmoyer:mainfrom
incanus:clock-stretching

Conversation

@incanus

@incanus incanus commented Oct 12, 2022

Copy link
Copy Markdown

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

incanus commented Oct 12, 2022

Copy link
Copy Markdown
Author

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