-
Notifications
You must be signed in to change notification settings - Fork 143
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
Enable STM32 extended I2c on many targets #118
Enable STM32 extended I2c on many targets #118
Conversation
48c92cd
to
b828c89
Compare
Is the compile time still bad now with your improvements? |
No, that is solved. I compared the results of the calculator to CubeMX and it seemed to be correct. Sometimes the register values look vastly different but the timing will be nearly identical. In many cases there are a lot of near optimal solutions. |
Very nice! Can you rebase on top of develop, I think you need the new STM32 CMSIS headers for the CI? |
138df0d
to
42be77d
Compare
The I2C driver now compiles successfully on all F0, F3, F7, L0, L4. I would really appreciate it, if someone could test it on F0/F3/F7/L0 hardware The remaining errors in the CI are unrelated problems with the ADC driver on L41x/42x targets. |
Absolutely fine with me. I‘ll test some devices from my magic STM32 box and will post the results. |
I tested the F3 disco accelerometer example with success, but since we don‘t have any off-the-shelf I2C examples for F0/F7, I didn‘t continue testing. Will do so tomorrow. |
Works on F072 Discovery. Checking on F7 Disco next. |
Working also on F7. I'm merging this once the CI passes. |
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.
Fantastic work!
Thanks for testing! |
This renames and enables the L4 I2C implementation for many more targets. A prescaler calculator is implemented based on ST's beautiful excel sheet with VBA macros. This calculator deliberately violates conditions stated in the reference manual to simply do what ST does (except that it does not use half-french class names).
CAUTION: This is work in progress and not ready. On my machine trying to compile the Nucleo L476 i2c example eats up all ram. ST's brute-force approach of trying to check all possible
16*255*255
combinations seems to be too much for GCC's constexpr evaluation logic. Any ideas?