-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix stm32 pull overwrite #3056
Conversation
@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.
dc24be2
to
24d82d1
Compare
@0xc0170 thanks |
/morph test |
@mbed-bot: TEST HOST_OSES=ALL |
[Build 1049] |
Test failure is OK, it's an issue with an unrelated platform. |
Result: FAILUREYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 0 Test failed! |
Same deal for above, LGTM |
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