cancel
Showing results for 
Search instead for 
Did you mean: 

Auto detect budrate serial

ibrahim
Associate II

Posted on June 28, 2016 at 11:48

Hello,

I have a STM32L031K6 and I want some auomatiser my reception function is adding automatic detection of transmission speed (baud rate) how I can do.

thank you very much

11 REPLIES 11
Nesrine M_O
Lead II
Posted on June 30, 2016 at 12:21

Hi enedis.ibrahim,

Please look carefully to the Baud rate generation paragraph in the USART section in your related reference manual to have idea on how the USARTx_BRR register is programmed.

-Syrine-

ibrahim
Associate II
Posted on July 01, 2016 at 12:54

Hello xD,

Thank you, it works well, I even remake detection timer. but now i have anathore problem beacuse my stm32 is detect the 9200 baude and 1200 baude but after i do not get anything until I have to remain a card and soon several times to reset the card.

In Part I initalisation initializes the GPIO's after the timer and I trigger the interruption of Timer and when my timer after receiving Detect speed baude 1200 or 9600 baude I initialized the UART and trigger the interruption of the reception. But I do not get anything up to reset the STM32L0 card once or several times and if I want to change and other data with different speed I also have to reset or more reset. I do not know if it is a receive interrupt problem because at the beginning I get weird characters to do a reset. before the speed detection that automatically walk. Thanks