-
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
stm32l1 allow open drain #4854
stm32l1 allow open drain #4854
Conversation
Some peripherals (e.g. i2c) must be configured in open drain. Otherwise weird behaviour appears such as voltages half way up or down. This adds support to configure Open-Drain GPIO from the standard API.
Otherwise the voltages do not go all the way up or down.
I am working at a solution for #4472 as we speak (probably get it done today, but testing will take a while), so I would say we merge this first so at least the I2C for the l1 is fixed for now. code looks valid -> untested ACK once Travis is green. |
I didn't see there was discussion already about it. I like the agreed solution in #4472 is far way more elegant than this patch 👍 however, I added one comment: open drain pull down is also valid for stm32l1 (according to the user manual). Feel free to merge this to fix the i2c (most of the changes will be replaced by your next PR). I tested it, but maybe someone can do a double check :-) |
@haukepetersen ready to merge? |
nope, I would actually tend to close this in favor of #4862 |
Then I do so. |
The current API configuration does not allow open-drain to be configured in the GPIOs. However, the i2c needs to be configured as open-drain otherwise the output is corrupted.
In the following image you can see the output of the pins with not configured as open-drain. This effect is also observed by others
The patch just extends the behaviour and does not modify the existing one.