-
Notifications
You must be signed in to change notification settings - Fork 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
cpu/stm32: allow arbitrary I2C clocks #20169
base: master
Are you sure you want to change the base?
Conversation
typedef enum { | ||
#if defined(CPU_FAM_STM32F1) || defined(CPU_FAM_STM32F2) || \ | ||
defined(CPU_FAM_STM32F4) || defined(CPU_FAM_STM32L1) || \ | ||
defined(CPU_FAM_STM32MP1) |
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 am not familiar with this header. There seemed to be a distinction between the STM families that has been completely removed. How does this work now? Got the distinction just dropped? Was it not need in the first place?
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.
The one implementation (i2c_1.c
) already supported arbitrary I2C speeds, the other (i2c_2.c
) did not. This adds support for arbitrary I2C speeds for the other (i2c_2.c
) as well. Hence, both enum
values are just for backward compatibility / portability now.
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.
No :-/ i2c_1.c
doesn't allow arbitrary clock speeds. I need to revert that.
d0c2bb5
to
54a822e
Compare
This needed a rebase to resolve merge conflicts. I guess I'd rather test the I2C peripheral again on a board of each flavor to avoid any regressions. |
8a19639
to
70bb72a
Compare
|
70bb72a
to
e79755b
Compare
So we can drop the WIP tag? |
e79755b
to
25c08a0
Compare
This adds support for using arbitrary I2C clock speeds for the I2C peripheral implemented in i2c_2.c. Co-authored-by: benpicco <[email protected]>
2925b79
to
2da7b12
Compare
Contribution description
This allows arbitrary I2C clock frequencies for MCUs using the
i2c_2.c
I2C implementation.Testing procedure
I2C should still work and still have the correct clock frequency.
Issues/PRs references
None