Electronic – how can a GPIO of stm32 have many alternative functions

gpiostm32

I am working on the assignments of pins of STM32F103ZET1.

On page 31 of datasheet, it says that PA0 has many alternative functions: TIM2_CH1_ETR \ USART2_CTS \ WKUP \ ADC123_IN0 \ TIM5_CH1 \ TIM8_ETR. From the reference manual, I know that TIM2_CH1_ETR and USART2_CTS can be remapped.

What about other functions? What if I want to use TIM5_CH1 and TIM8_ETR at the same time? How can the STM32 know whether I want to consider PA0 as TIM5_CH1 or TIM8_ETR?

1: datasheet, reference manual

Best Answer

After spending a few minutes searching the datasheet, I've concluded that you can't remap those functions. However, they're both inputs. So you can use them both at once to trigger different things in those two timers.