Half real baud rate vs. configured
I used STM32CubeIDE on a Nucleo-L073RZ board to, using LL for everything, configure USART1 to
- 19200 bauds,
- 8N1,
- oversampling=16x,
- In IOC file Clock Configuration,
- "USART1 Source Mux" shows 32MHz, from PCLK2,
- which is the same as all bus clocks & sysclock
- The input comes from HSE, which is, from that I saw, the tapped 8MHz from the on-board debugger MCU, which used to work for me in the past.
So there seems nothing wrong with the general clock setup.
Yet, on the oscilloscope, I see that the bit width of double the width of 19200, i.e. I am getting 1/2 the expected baudrate.
EDIT: I configured PA8 MCO pin to SYSCLK with DIV1, and lo and behold, it shows 16 MHz on the oscilloscope, instead of expected 32. So that explains the baud rate: but everything in Cube is showing me 32 MHz...
EDIT #2: Aha! I put now HSE on MCO, and it's 4 MHz! That comes from the STLink on this NUCLEO board. I could swear it used to give 8 MHz, and it has a 8MHz crystal on it.
BUT I very recently let CubeIDE update the firmware of this ST-Link.
Is this a bug of this new ST-Link firmware, that it only outputs 4 MHz to the other MCU on this devboard? (IIRC it's the MCO of the on-board ST-Link that's being used for this, so a divider in the firmware might be set wrong)
Any ideas what might cause this?
