2026-03-18 1:59 AM - last edited on 2026-03-18 2:06 AM by mƎALLEm
Split from this post.
Hello,
Sorry to bother you again, but it seems that since yesterday (when I enabled the CAN bus), the UART on my Nucleo has stopped working, even though I haven’t touched anything since then.
To be precise, I’m monitoring my UART signal and I’m only getting ‘framing errors’, obviously, I’ve checked and the baud rates are the same on both sides.
Could activating the HSE clock have disrupted the operation of my UART ?
Thank you in advance for your help,
Solved! Go to Solution.
2026-03-18 4:18 AM - edited 2026-03-18 4:36 AM
Hello,
That doesn't make sense to me as both configuration have the same clock frequency value 32MHz for USART.
As you have the same Clock configuration in both projects and as USART is working with HSI, I'm suspicious about the clock configuration you set for the STLINK. In CubeMx HSE= 5MHz, but is it really fed by 5MHz in OSC_IN pin from STLINK?
Could you please double check whether you set the correct MCO output clock (5MHz) for STLINK using CubeProgrammer? (refer to How to use STLINK-V3 MCO output on Nucleo boards as a precise clock source for STM32)
PS: for CAN, increase the Kernel clock to 40MHz as shown below
2026-03-18 2:10 AM
Hello,
wrote:
Could activating the HSE clock have disrupted the operation of my UART ?
No. Better to use HSE for communication including UART.
Better to share your ioc files (with UART working and not working). What baudrate are you targeting?
2026-03-18 2:58 AM
2026-03-18 4:18 AM - edited 2026-03-18 4:36 AM
Hello,
That doesn't make sense to me as both configuration have the same clock frequency value 32MHz for USART.
As you have the same Clock configuration in both projects and as USART is working with HSI, I'm suspicious about the clock configuration you set for the STLINK. In CubeMx HSE= 5MHz, but is it really fed by 5MHz in OSC_IN pin from STLINK?
Could you please double check whether you set the correct MCO output clock (5MHz) for STLINK using CubeProgrammer? (refer to How to use STLINK-V3 MCO output on Nucleo boards as a precise clock source for STM32)
PS: for CAN, increase the Kernel clock to 40MHz as shown below
2026-03-18 4:27 AM
@AmGo wrote:I’m monitoring my UART signal and I’m only getting ‘framing errors’,
How, exactly, are you "monitoring" it?
Framing errors could indicate wrong baud rate.
Have you checked the baud rate using an oscilloscope?
2026-03-18 4:53 AM
Read out and check/compare UART and relevant RCC registers content between "working" and "non working".
JW
2026-03-18 5:33 AM
I am using a Saleae probe to monitor my frames.
And unfortunately I don't have a "real" oscilloscope to check it
2026-03-18 5:39 AM
Right, I've applied your changes to my FD CAN clock running at 40 MHz (though I'm a bit confused: I set my PLL Source MUX to HSE, but then I select PPLL1Q as the input to my FDCAN ? Sorry if I'm missing something, but I'd appreciate some clarification if possible).
Also, when I open SM32Cube Programmer and click on ‘Firmware Upgrade’, I get this and nothing else; I don’t think that’s normal, but perhaps I’ve simply forgotten to configure something...
Thank you very much for your help,
2026-03-18 5:39 AM
Did you check the ST-LINK MCO output settings using CubeProgrammer as I suggested previously?
2026-03-18 5:43 AM
@AmGo wrote:I am using a Saleae probe to monitor my frames.
So what, exactly, does it show you?
Are there really mal-formed frames ?
What is the actual baud rate on the line ?