-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: Fix I2C repeated start by converting to IT mode #4169
Conversation
The single build failure is the |
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.
If you gotta, you gotta. No testing performed. I initially wondered if i2c_assign_irq needed a "free irq" counterpart, but now I see it's just determining the preassigned IRQ for the peripheral... I'll stick on an Approve but I don't know what's going on with that failed build .. doesn't make much sense
I'm fine with whatever you want to do. Please stick to one reviewer. You need to sort out the build issue before we can merge. |
@tannewt I added @siddacious since it was originally his issue, and he might have wanted to test. |
@jepler quick ping for your review again, this should be good to go. |
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.
change to save storage seems fine to me. though, rgbmatrix and sharpdisplay both become less useful without framebufferio so consider disabling them as well in a future commit.
We can find something else to remove instead. We were not able to understand why the |
The existing implementation of I2C does not currently recognize requests for a repeated start condition, which caused reads to fail on some chips. Since only the "IT" interrupt-driven versions of the ST HAL support this feature, fixing this issue also required implementing the usual infrastructure for ST interrupts, matching other modules like UART and PulseIn.
@tannewt I didn't really touch the base implementation here, but if you think we'd benefit from moving regular I2C operations to the interrupt mode (non-blocking) I can add in the requisite timeouts/keyboard interrupt stuff.
Resolves #3736