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

[RP2040] i2c: fix speed calculation #382

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

KarlK90
Copy link
Contributor

@KarlK90 KarlK90 commented Nov 23, 2023

The former speed calculation where way off the requested i2c speeds. This fix, which is based on the official pico-sdk implementation fixes the calculation for the high and low times:

Speed Before After
100k 126k 94k
400k 660k 346k
1000k - (*) 760k

(*) Failed to start any transaction in my testing setup.

The former speed calculation where way off the requested i2c speeds.
This fix, which is based on the official pico-sdk implementation fixes
the calculation for the high and low times:

 | Speed | Before | After |
 | ------| ------ | ----- |
 | 100k  | 126k   | 94k   |
 | 400k  | 660k   | 346k  |
 | 1000k | - (*)  | 760k  |

(*) Failed to start any transaction in my test setup.
@fpoussin fpoussin merged commit 9d7a7f9 into ChibiOS:chibios-21.11.x Nov 27, 2023
1 check failed
@fpoussin
Copy link
Member

Thank you!

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.

2 participants