2020-08-25 06:30 AM
2020-08-25 04:49 PM
CubeMX will give pins for each peripheral. You can also check the datasheet.
PA9 cannot be a GPIO pin and USART_TX at the same time, but your program can switch between the two functions as needed.
2020-08-25 07:11 AM
Its hard to answer without knowing the software you are using. At runtime you can look at the registers to find out how a pin is configured. See the "reference manual" for you chip family MODER register and more.
2nd: the pin function can be reconfigured on-the-fly by the code running. So, yes you can switch as you need, supposedly the pin is connected to suitable external components.
2020-08-25 04:48 PM
The STM32F1 family doesn't have a MODER register. Remapping is handled on a peripheral basis.
2020-08-25 04:49 PM
CubeMX will give pins for each peripheral. You can also check the datasheet.
PA9 cannot be a GPIO pin and USART_TX at the same time, but your program can switch between the two functions as needed.