2024-06-25 10:20 PM
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.
2024-06-26 10:32 AM
You need to provide a lot more details!
What "console" are you talking about?
What board are you running on/
How is that board connected to the "console"?
etc, etc - see:
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 ...
2024-06-26 01:40 PM
Understand we are not psychic here..
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.