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

STM32: F1 GPIO: Enable AFIO clock #4944

Merged
merged 1 commit into from Aug 29, 2017

Conversation

Projects
None yet
6 participants
@LMESTM
Contributor

LMESTM commented Aug 21, 2017

Description

It is required to enable AFIO clock before using __HAL_AFIO_REMAP_xy
macros, which was missing here. Without clocks enable, the remap
actually doesn't occur. This would possibly cause some PIOs (part of
PB_3, PB_4, PA_13, PA_14, PA_15) to not behave as expected.

In most cases AFIO clock was enabled in stm_pin_SetAFPin function, so
that this bug was not visible. But there were few cases left were
stm_pin_DisconnectDebug would be called first. A typical case was
with GCC_ARM in case a DigitalInOut variable is declared as global.

Status

READY

Tests

Few MBED2 tests were failing on GCC_ARM/IAR before the fix.
Now:

Test ID Test Description Target Toolchain Result
MBED_A5 DigitalIn DigitalOut NUCLEO_F103RB ARM OK
MBED_A5 DigitalIn DigitalOut NUCLEO_F103RB GCC_ARM OK
MBED_A5 DigitalIn DigitalOut NUCLEO_F103RB IAR OK
MBED_A5 DigitalIn DigitalOut NUCLEO_F103RB uARM OK
MBED_A6 DigitalInOut NUCLEO_F103RB ARM OK
MBED_A6 DigitalInOut NUCLEO_F103RB GCC_ARM OK
MBED_A6 DigitalInOut NUCLEO_F103RB IAR OK
MBED_A6 DigitalInOut NUCLEO_F103RB uARM OK
MBED_A7 InterruptIn NUCLEO_F103RB ARM OK
MBED_A7 InterruptIn NUCLEO_F103RB GCC_ARM OK
MBED_A7 InterruptIn NUCLEO_F103RB IAR OK
MBED_A7 InterruptIn NUCLEO_F103RB uARM OK
STM32: F1 GPIO: Enable AFIO clock
It is required to enable AFIO clock before using __HAL_AFIO_REMAP_xy
macros, which was missing here. Without clocks enable, the remap
actually doesn't occur. This would possibly cause some PIOs (part of
PB_3, PB_4, PA_13, PA_14, PA_15) to not behave as expected.

In most cases AFIO clock was enabled in stm_pin_SetAFPin function, so
that this bug was not visible. But there were few cases left were
stm_pin_DisconnectDebug would be called first. A typical case was
with GCC_ARM in case a DigitalInOut variable is declared as global.
@0xc0170

This comment has been minimized.

Member

0xc0170 commented Aug 21, 2017

retest uvisor

@0xc0170 0xc0170 added the needs: CI label Aug 21, 2017

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Aug 21, 2017

/morph test

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Aug 21, 2017

retest uvisor

@mazimkhan

This comment has been minimized.

Contributor

mazimkhan commented Aug 21, 2017

uvisor retest

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Aug 21, 2017

retest uvisor

@studavekar

This comment has been minimized.

Collaborator

studavekar commented Aug 28, 2017

/morph test

@mbed-bot

This comment has been minimized.

mbed-bot commented Aug 29, 2017

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 1132

All builds and test passed!

@theotherjimmy theotherjimmy merged commit d68cd09 into ARMmbed:master Aug 29, 2017

4 checks passed

Cam-CI uvisor Build & Test Success
Details
ci/morph-test Job has completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment