Question
Pins with multiple alternate functions in STM32F103
Posted on July 21, 2015 at 10:45
Hi all,
I am working with a STM32F103 MCU. In this MCU, some pins have multiple alternate functions such as PA8 which has the following alternate functions ''USART1_CK/TIM1_CH1/MCO''. If I simply define such pin e.g. PA8 as GPIO_Mode_AF_PP, which function would be activated? Would it be automatically selected by MCU based on the connection of the pin? In my case, I have a Secure Access Module (SAM) which is connected to my MCU and PA8 is connected to the clock input of SAM, so in my case it would be reasonable to use USART1_CK since other SAMs in my design are connected to UARTx_CKs. Would MCU detect the clock input of SAM and activate USART1_CK among other functions in PA8? Thanks for your help, Dan.