USART Init
Moderator: RoccoMarco
USART Init
Good day. When I initialize the USART STM32F205 on TxD signal appears not valid bytes (0s00 or 0xFF). How to solve this problem?
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: USART Init
Probably it is a glitch on the TX pin when the mode is changed. Do the following:
1) Make sure that TX is programmed as output pust-pull in board.h and initialize it to 1.
2) In the main() start the serial driver using sdStart().
3) Change the pin mode to alternate(x) usin palSetPadMode().
The glitch is caused by the STM32 USART, for some reason the TX signal is set to zero when its clock is not yet enabled.
Giovanni
1) Make sure that TX is programmed as output pust-pull in board.h and initialize it to 1.
2) In the main() start the serial driver using sdStart().
3) Change the pin mode to alternate(x) usin palSetPadMode().
The glitch is caused by the STM32 USART, for some reason the TX signal is set to zero when its clock is not yet enabled.
Giovanni