Looks like a similar problem was solved in How to change UART or USART for stm32f4? - #9 by karthikey_kadati