Can anyone help to find the error in the code because it is not able to print anything on the console. I have also try to change the pins of UART but then also it is not be to print anything on the console.
Start with a minimal example which just sends fixed message
sending continuous uppercase 'U' is good - as you can then easily check that on a 'scope, see if the baud rate is correct, etc
Then try receiving, and doing a simple loop-back ...
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Is this the STM32F411RE you've mention in a prior post? Is it on a NUCLEO-F411RE board?
Check the MSP code initializing the USART2 clocks, and GPIO pins.
The baud rate must match those of the ST-LINK VCP/CDC connection, if that's what you're attempting to use.
Send some data directly via HAL_UART_Transmit(), then check the plumbing for the __io_putchar() for printf() to work.
Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
A
Anonymous
February 25, 2026
Since this is your first project (like my first Flooring Project website), small setup mistakes can stop everything from working.
If nothing is printing on the console, it’s likely a configuration issue — such as UART not initialized properly, wrong baud rate, incorrect COM port, or TX/RX pin mismatch.
In my Abu Dhabi Flooring Project, I also learned that even a tiny setup error can cause no output. Double-check the initialization and serial settings, the issue is usually something small but important.