2023-11-28 03:43 AM
2023-11-28 03:50 AM
Its the pin function setting.
i.e. if you want PA1 (in your example) to use UART then you have to select Alternate Function 7. A different pin function e.g. I2C will be a different Alternate Function.
The value you select is loaded into the GPIOx_AFRL / GPIOx_AFRH registers.
See page 272 of RM090 for an explanation of Alternate Function GPIO Multiplexing:
2023-11-28 04:12 AM - edited 2023-11-28 04:15 AM
AFx represent as said @###### the alternate function number x. you can configure a pin for a specific AFy by writing y to specific 4 bits of the:
For more details, take a look at the RM0440. pages 365/366
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-11-28 04:26 AM
Thanks.
I have searched in the wrong Datasheet. There i could not find the meaning of the AF numbers. I really dont like having two datasheets!
2023-11-28 04:37 AM
The Data Sheet/Manual covers the pin level stuff as there are multiple packages with different pins and sizing.
The Reference Manual covers a lot of the general die / family level stuff, the registers and peripherals, some of which won't escape from smaller packages.
They've been doing this for more than a decade, don't anticipate this strategy changing.
Probably shouldn't mention the Programming Manual..