cancel
Showing results for 
Search instead for 
Did you mean: 

Alternate function mapping table

andreaspiezia9
Associate III
Posted on October 18, 2013 at 11:04

Hi all,

at page 135 of 

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/reference_manual/CD00240193.pdf

, I found a note: ''To know which functions are multiplexed on each GPIO pin, refer to the datasheets.'' But I didn't find the datasheet for 

STM32F303VCT6.

At the end, I need to know which value insert in the registers GPIOx_AFRL and GPIOx_AFRH. 

Can someone help me?

Thanks

#lmgtfy #lmgtfy:-stm32-resources #alternate-function-mapping #stm32f303vct6-alternate-function #goes-to-15
16 REPLIES 16
andreaspiezia9
Associate III
Posted on October 21, 2013 at 09:29

Hi Clive,

thank you.

But I can't find the table with the values used for GPIOx_AFRL (for pin 0 to 7) and GPIOx_AFRH (for pin 8 to 15) configuration in order to select the appropriate alternate function.

Probably there is something that I didn't understand. 

Posted on October 21, 2013 at 15:36

Click on the ''Pg 43'' link provided, navigate to Page 43, observed the table, AF0=0, AF1=1,..AF15=0xF

0690X00000605FHQAY.png

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
andreaspiezia9
Associate III
Posted on October 21, 2013 at 16:15

Thank you Clive,

now is clear:

for selecting the AF1, I need to write 0x00000001 both for GPIOx_AFRL and  GPIOx_AFRH as reported at page 147 of 

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/reference_manual/CD00240193.pdf

Posted on October 21, 2013 at 16:26

You might want to select the Reference Manual for your part, RM0316

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/reference_manual/DM00043574.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
andreaspiezia9
Associate III
Posted on November 15, 2013 at 10:13

Thanks

wohler
Associate
Posted on December 10, 2013 at 03:41

I'm also having difficulty locating such a table for the STM32L152xB. The datasheet has a list of functions for each pin, but no table of how they are mapped to the AFRL/H. Any thoughts?

Posted on December 10, 2013 at 04:27

I'm also having difficulty locating such a table for the STM32L152xB. The datasheet has a list of functions for each pin, but no table of how they are mapped to the AFRL/H. Any thoughts?

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/CD00277537.pdf

AFRL describes pins 0-7, AFRH pins 8-15. Each pin source is described by 4-bits, 8x4 = 32-bits in the AFRL/AFRH. The source AFIO[0..15] represents the 4-bit encoding.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ashish
Associate
Posted on December 11, 2013 at 14:41

Hello,

the datasheet you have mentioned above has specified the alternate function  correctly but not in my case of stm32f407vg controller in UM1472 User Manual....its like AF ..

.USART2_RTS/

USART4_RX/

ETH_RMII_REF_CLK/

ETH_MII_RX_CLK/

TIM5_CH2/

TIMM2_CH2/

ADC123_IN1

any idea about AFx?

is it like AF0/AF1/AF2/AF3.........?