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

Fix i2c write #52

Merged
merged 5 commits into from
Jan 11, 2024
Merged

Fix i2c write #52

merged 5 commits into from
Jan 11, 2024

Conversation

9names
Copy link
Collaborator

@9names 9names commented Jan 11, 2024

I2C write was unreliable for a few reasons.

  1. timeouts were very short
  2. we were only waiting for i2c_bus_busy to be cleared, which sometimes happens before the fifo is empty.

By switching timeouts to use elapsed microseconds (estimated via McycleDelay) and waiting for an empty fifo, I can reliably use a SSD1306 screen now. This was impossible before.

Resolves #48

@9names 9names merged commit f1a1f23 into sipeed:main Jan 11, 2024
4 checks passed
@9names 9names deleted the fix_i2c_write branch January 11, 2024 13:08
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.

i2c timeout is not long enough
1 participant