2014-05-20 06:52 PM
Browsing through the STM32 F405 datasheet, I'm noticing serial ports with functions listed multiple times even on the same chip. At first I assumed (for example, USART1 TX) would be listed multiple times, but on any given package (say 64pin, vs 100pin) it woiudl only show up on one pin.. but this is not the case.
Example: USART1 TX is listed on both pin 42 and 58: pin 42 PA9: USART1_TX/ TIM1_CH2 / I2C3_SMBA / DCMI_D0/ EVENTOUT pin 58: PB6 I2C1_SCL/ TIM4_CH1 / CAN2_TX / DCMI_D5/USART1_TX/ EVENTOUT I'd just like to confirm.. either pin can be configured for this function at your will; default function is probably just the GPIO. Or is it very particular.. pin choice based on timer or some combination of peripherals? Need to read deep into the DS and see, but I'm confused a bit; any simple pointer? Thanks for your patience :) #stm32-f42014-05-20 07:08 PM
The F2/F4 parts have a pin level multiplexor, you can pick-n-mix what peripherals you want to select as limited by the table in the data sheet. There are nominally up to 16 choices of AF (Alternate Function), or as a simple GPIO. The table is a little more sparse than 16, but it's a 4-bit selection.
This differs somewhat from the original F1 parts, where the peripheral pins where blocked together. ST has a Micro Xplorer app to allow you to ''fit'' the design into specific pins/parts, people have made Excel sheets, and you can do it manually. For the USARTs there are some specific pin pairs used by the System Loader, so check if these lock some of your choices. Things like SDIO also tend to drive a very small set of pins. Look at the EVAL boards for some semi-optimal placements.