Skip to content

Fix stm32 pull overwrite #3056

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

Merged
merged 2 commits into from
Oct 19, 2016
Merged

Conversation

LMESTM
Copy link
Contributor

@LMESTM LMESTM commented Oct 18, 2016

Description

This is a fix for all STM32 families for reported issue #2638.
The pull-up / pull-down was over-writtent in case irq API was called after pinmap one.

Status

READY

Tests

Tests ok - no regression seen - all families tested
Nonreg_FixPullOverwrite.xlsx

Also the test reported in the issue runs fine on all tested boards when the fix is applied

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 18, 2016

@LMESTM I believe 3 top commits should not be part of this fix patch

This applies the same fix as was done for F4 to solve issue ARMmbed#2638.
The fix applies ell to all other families excpet STM32F1.

Basically, to avoid over-writing the pull-up/-down settings, we read the
current state from HW.
This fix addresses issue ARMmbed#2638 for STM32F1.
The STM32F1 family has a diffeerent register set for pull-up and pull-down
settings.

The same principle to read HW state is applied, as in commit:
[STM32] Fix pull over write to all families
except registers are different.

Also in this patch we make code a bit more linear.
Depending on pin_index, different register and shift index must be used.
Instead of checking this in several place, let's make a check at the
beginning of the function and use local register and shift variables.
@LMESTM LMESTM force-pushed the fix_stm32_pull_overwrite branch from dc24be2 to 24d82d1 Compare October 18, 2016 10:18
@LMESTM
Copy link
Contributor Author

LMESTM commented Oct 18, 2016

@0xc0170 thanks
Those were already commits merged in master. This seomtimes happens during rebase, not sure why. So rebased again and this is better now.

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 18, 2016

/morph test

@bridadan
Copy link
Contributor

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@mbed-bot
Copy link

[Build 1049]
FAILURE: Something went wrong when building and testing.

@bridadan
Copy link
Contributor

Test failure is OK, it's an issue with an unrelated platform.

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 0

Test failed!

@bridadan
Copy link
Contributor

Same deal for above, LGTM

@sg- sg- merged commit f1d678f into ARMmbed:master Oct 19, 2016
@LMESTM LMESTM deleted the fix_stm32_pull_overwrite branch May 23, 2017 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants