In the STM32F030X8 datasheet the PortB pin 15 alternate function AF0 is both SPI1_MOSI and SPI2_MOSI
(see table 13 on page 35 of en.DM00088500.pdf). The pin 15 is just an example - there are more of such.
How can this be resolved? Is there some other register that specifies the SPI module to connect to the pin?