2017-04-24 12:38 AM
Hi,
I am flashing the UART sample code given in STM32CubeF2 in my STM32F207ZG nucleo board,
It is compiling and flashing well but when I see the output on terminal (Tera term) it is printing garbage data (few characters are matching).
I have seen the baude rate in example is 9600 so a have set the same on tera term as well.
i should get o/p as:-
UART Printf Example: retarget the C library printf function to the UART
** Test finished successfully. **
And what I am getting is-
Õ�RT �òénôæ Eøampìåº òåôaògåô ôhå C ìébòaòy pòénôæ æunãôéïn ôï ôhå Õ�RT
** Tåsô æénéshåd suããåssæuììy® **2017-04-24 02:19 AM
Hi,
Please provide more details about y
our Hyperterminal configuration:
data length
,
parity,
..
What's your Data value and
HSE crystal (Does your board have
HSE crystal 25 MHz
) ?Imen
2017-04-24 05:21 AM
thanks Imen.., as you said problem was with hyper terminal configuration.
My tera term configuration was as-
data - 8 bit
parity - none
It should be -
data- 7 bit
parity - odd
2018-03-22 04:08 PM
Perfect! Thanks! I had the same problem with the example for the STM32F103RB_Nucleo board. Fixed now!
2018-03-22 05:16 PM
There is usually a big warning around the USART init code, but is a bit outside normal usage.
/*♯♯-1- Configure the UART peripheral ♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯♯*/
/* Put the USART peripheral in the Asynchronous mode (UART Mode) */ /* UART configured as follows: - Word Length = 8 Bits (7 data bit + 1 parity bit) : BE CAREFUL : Program 7 data bits + 1 parity bit in PC HyperTerminal - Stop Bit = One Stop bit - Parity = ODD parity - BaudRate = 9600 baud - Hardware flow control disabled (RTS and CTS signals) */ UartHandle.Instance = USARTx;There are a couple of projects where the HSE_VALUE in stm32fxxx_hal_conf.h is wrong, but the NUCLEO's typically pull 8 MHz from the ST-LINK