Skip to main content
Carter Lee
Associate III
Sep 25, 2017 8:45 AM UTC
Solved

What am I supposed to do to use PA14, PA15 in STM32F103xx?

Posted on September 25, 2017 at 10:45

Hi.

In the STM32F103, I'd like to control PA14, PA15 pin to I/O, But It's not controlling as my mind.

When I checked that with reference document, I found the below information.

0690X00000608M0QAI.png

I think If I want to use PA14 and PA15, then I have to do something.

If I want to use PA14 and PA15, what am I supposed to do?

    This topic has been closed for replies.
    Vangelis Fortounas
    Associate II
    Sep 25, 2017 12:35 PM UTC
    Posted on September 25, 2017 at 14:35

    Hi!

    0690X00000608MsQAI.png

    The way to use PA14,PA15 as normal GPIOs  is to use

     __HAL_RCC_AFIO_CLK_ENABLE();

    __HAL_AFIO_REMAP_SWJ_DISABLE()  macros.

    But after this there is no debug functionality (you can program your device only under hardware reset).

    Rgrds

    vf

    2 replies

    AvaTar
    Senior III
    Sep 25, 2017 9:16 AM UTC
    Posted on September 25, 2017 at 11:16

    If I want to use PA14 and PA15, what am I supposed to do?

    Configure them as you do with others.

    But I would think twice (or thrice) before doing so. You loose the ability to debug.

    Vangelis Fortounas
    Associate II
    Sep 25, 2017 12:35 PM UTC
    Posted on September 25, 2017 at 14:35

    Hi!

    0690X00000608MsQAI.png

    The way to use PA14,PA15 as normal GPIOs  is to use

     __HAL_RCC_AFIO_CLK_ENABLE();

    __HAL_AFIO_REMAP_SWJ_DISABLE()  macros.

    But after this there is no debug functionality (you can program your device only under hardware reset).

    Rgrds

    vf