Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
STM32 I2C two wire LCD - bug fix and soft I2C driver implementation #26433
base: bugfix-2.1.x
Are you sure you want to change the base?
STM32 I2C two wire LCD - bug fix and soft I2C driver implementation #26433
Changes from 2 commits
637983d
14e57de
e581b2b
e7f6fdc
2c3f6cd
69da85b
218ffa0
e1b9a4d
3705f77
fc98192
607d837
892c347
1f2148e
690fc49
3a5d488
fdd617a
ad8b91a
fad7d7d
4af6a75
87a8f14
d410e6e
7c34822
e8189c0
5119dd3
2a05fc0
bf79fb9
64f6836
0479483
43c0ad2
3cbaa5a
3d34cc8
da724c1
addf2ad
7772c7d
792edeb
4b07a32
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some i2c libraries impose a message length limit of 32 bytes, though this is not universal. What is the reason for making the max message length one less than the buffer length? For a 32-byte buffer it will result in 31 bytes sent followed by one byte, but i2c libraries should at least be able to handle the full 32 byte send.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you considered maxing out clock speed by default?
The maximum is 500_000 but results in "only" 138kHz in an SKR3 (550MHz).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done but it didn't seem to affect anything. I've set both to 400K but both actuals come in at about 100K. I expected to get more speed on the hardware driver version. I'll definitely investigate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the experiment of removing all delayMicrosecond calls from the SoftWire library and that made it reach something like 200kHZ, then I replaced all pin operations with platform specific ones and it reached 260kHz.
There is another bunch of optimisations which have a very big impact here.