cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F205RBT6 Alternate function mapping

baswensveen
Associate
Posted on July 16, 2012 at 12:02

Hello,

Can someone please explain to me how the alternate function mapping works? I found the alternate mapping table in the datasheet but how to read it. What is the default location of peripherals.

For example by default the micro is in configured at AF0, for example what would the location of SPI1 be in that case?

For my application I need 5pin jtag, TIM2 ch1/ch2 as 32 bit encoder counter and TIM5 ch1 as PWM output.

Also when I only use channel 1 of a timer, can I use the pins for the other channels for gpio or other peripherals like jtag or spi?

Thanks

2 REPLIES 2
Posted on July 16, 2012 at 13:39

Think of it as two rotary switches. First select AF Mode for the pin, then select the Peripheral for the pin. You can mix and match. If the first switch is NOT AF Mode the pin will be a GPIO (IN, OUT, ANALOGUE).

So yes, you can get a single timer channel out. You could get USART Rx and TX out if different GPIO banks. You can escape any pins, in any order, as described in the AF mux table.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
baswensveen
Associate
Posted on July 16, 2012 at 14:57

clive1,

Thanks for your answer. I understand now, so I just use the function GPIO_PinAFConfig to map a pin to a

peripheral.

Thanks