8000 I2C Fake tri-state generate a glitch which can be considered as a Start · Issue #405 · eblot/pyftdi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

I2C Fake tri-state generate a glitch which can be considered as a Start #405

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

Open
renaudwalder opened this issue Mar 18, 2025 · 2 comments · May be fixed by #414
Open

I2C Fake tri-state generate a glitch which can be considered as a Start #405

renaudwalder opened this issue Mar 18, 2025 · 2 comments · May be fixed by #414

Comments

@renaudwalder
Copy link

Using the fake tri-state of the device on an I2c transfer generates a glitch in the SCL and SDA signal.
After some investigation, it comes from the _clk_input_data_input commands.

Replacing this command by _idle command, solves the issue.

Here is some pictures of the stop bits and the glitch.

Glitch after the stop bit

Glitch removed

@dnschneid
Copy link

I've encountered this bug as well. The workaround we went with was to disable fake tristate mode (I2cController._fake_tristate = False), but obviously that's not ideal either.

Thanks for filing this bug; it sure saved us a lot of head-scratching.

dnschneid added a commit to dnschneid/pyftdi that referenced this issue May 7, 2025
Avoids accidential start conditions, fixes eblot#405
@dnschneid
Copy link

Looking at this again, it seems to me that _idle implements an active drive-high state, so that wouldn't be an appropriate substitute for _clk_input_data_input if you want fake tristate to work. If you're happy with the behavior with _idle, you should just disable fake_tristate mode.

Changing _clk_input_data_input to have the data bits high (rather than low) eliminates the glitch and still presents high-impedance. Technically, this replaces the low glitch with a high glitch, but as this is used after the stop condition, the bus is expected to go high regardless.

Similiarly, I can confirm that _clk_lo_data_input does generate a negative glitch on SDA (if it was high) before going high-impedance. I think this behavior is preferable over the alternative (glitching high before going high-impedance), since the device might already be driving low on the bus to provide an ACK and we don't want brief crowbar currents.

Filed #414 with the fix.

dnschneid added a commit to dnschneid/pyftdi that referenced this issue May 7, 2025
Avoids accidential start conditions, fixes eblot#405

As a side note, _clk_lo_data_input does generate a negative glitch on
SDA (if it was high) before going high-impedance. This behavior is
preferable over the alternative (glitching high before going
high-impedance), since the device might already be driving low on the
bus to provide an ACK and we don't want brief crowbar currents.
dnschneid added a commit to dnschneid/pyftdi that referenced this issue May 8, 2025
Avoids accidential start conditions, fixes eblot#405

As a side note, _clk_lo_data_input does generate a negative glitch on
SDA (if it was high) before going high-impedance. This behavior is
preferable over the alternative (glitching high before going
high-impedance), since the device might already be driving low on the
bus to provide an ACK and we don't want brief crowbar currents.
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 a pull request may close this issue.

2 participants
0