I have an STM32F303 with an 8MHz crystal, 9x PLL and 1.5/ USB pre-scaling. USB works perfectly which confirms the clock is indeed 8Mhz * 9 = 72MHz / 1.5 = 48MHz, otherwise USB wouldn't be active.
However when I use USART1 the baud rate is exactly 1.5 times SLOWER than it should be. I've looked through all the code - mine and the HAL, and I've even got to the point where I've put a fixed value of 313 in serial_lld.c in the usart_init function when setting u->BRR, that value being 72Mhz clock / AHB2 pre-scaler = 36Mhz / 115200 baud rate. This is exactly the calculation that ChiBIOS would do and indeed I've confirmed that using #pragma message to show the value of the pclk being passed into the routine.
In terms of how I know the baud rate is wrong, again I have used two methods - firstly an FTDI UART set to 115200 and secondly a logic analyser set to auto-baud which also confirmed the baud rate is 1.5x slower than it should be.
So to recap:
1) I'm sure the HSE is running at the right frequency
2) I'm sure the baud rate calculations done by ChiBIOS are correct
3) I've forced those calculations manually as a cross-check
4) The baud rate is still wrong!
What am I missing here? Sure it's a stupid mistake, but I'm b***ered if I can figure out what it is.....