USART Init

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
DGW
Posts: 47
Joined: Fri May 30, 2014 9:14 am

USART Init

Post by DGW »

Good day. When I initialize the USART STM32F205 on TxD signal appears not valid bytes (0s00 or 0xFF). How to solve this problem?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: USART Init

Post by Giovanni »

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
DGW
Posts: 47
Joined: Fri May 30, 2014 9:14 am

Re: USART Init

Post by DGW »

Did everything you wrote. I am using USART dryver (uartStart ()).
Post Reply