If the transfer from holding to shift register is done off the baud clock,
Do you think would be prudent to wait on both ?
while (transmitting && (USART_GetFlagStatus(USART2, USART_FLAG_TXE) == RESET) && (USART_GetFlagStatus(USART2, USART_FLAG_TC) == RESET));