cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple pins with same function?

skeezix
Associate II
Posted on May 21, 2014 at 03:52

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-f4
1 REPLY 1
Posted on May 21, 2014 at 04:08

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.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..