Skip to main content
Graduate II
May 14, 2025
Solved

STM32G474, dual functionality on PD3, alternate function 2

  • May 14, 2025
  • 1 reply
  • 702 views

I am confused.

On an STM32G474QE, I intend to use PD3 for TIM2_CH1. I'm running out of pins, so this is the only practical pin for me to use.

However, according to the datasheet (DS12288 Rev 6), this pin can be either TIM2_CH1 or TIM2_ETR when alternate function 2 is selected. It is mentioned in the pinout list, as well as the alternate functions table:

EThom3_1-1747210574894.png

EThom3_0-1747210511651.png

This confuses me. As far as I know, these two signals don't rule out each other. There shouldn't be anything preventing the developer from using ETR as a an external trigger or clock source, and at the same time use CH1 for input capture or output compare. Of course, I might be wrong about this.

I haven't found a description of this anywhere else in the datasheet. And not at all in the reference manual and the errata sheet. Nor have I been able to find a bit in the TIM2 registers that selects either CH1 or ETR for this pin.

Does anyone know what this is about? Have I missed something that should be obvious? Is it a typo that has somehow survived through numerous revisions?

Any help regarding this will be highly appreciated.

By the way, I see the exact same thing in the STM32G473 datasheet. No explanation there either.

    This topic has been closed for replies.
    Best answer by Igor Cesko

    Hello,

    There are 2 TIM functions on the same pin - there depends only from software how this can be used.

    More details:

    https://community.st.com/t5/stm32-mcus-products/how-to-use-tim2-etr-and-tim2-ch1-at-the-same-time/td-p/188934

     

      Regards

                            Igor

    1 reply

    Super User
    May 14, 2025

    Just try to set both in CubeMx on this pin, then you see...

    on some pins really 2 functions can work same time, something like  ADC1 input  and ADC2 input on a pin.

    ST Employee
    May 14, 2025

    Hello,

    There are 2 TIM functions on the same pin - there depends only from software how this can be used.

    More details:

    https://community.st.com/t5/stm32-mcus-products/how-to-use-tim2-etr-and-tim2-ch1-at-the-same-time/td-p/188934

     

      Regards

                            Igor

    EThom.3Author
    Graduate II
    May 14, 2025

    Thank you. Reading now, and trying to comprehend...