Page 1 of 1

UART baudrate frame information auto detect?

Posted: Tue Jul 28, 2020 4:41 am
by zliudr
Is there any way to auto detect baud rate, word length, parity, stop bits of a UART port? My thought is to trigger data on the UART port, then on ESP32 iterate through all combinations until there's no more frame error detected. I'm not sure how to implement this iteration so I thought I'd ask before trying some silly ways that won't work. Thanks.

Re: UART baudrate frame information auto detect?

Posted: Tue Jul 28, 2020 1:16 pm
by ESP_Sprite
You want to detect all those things? Suggest you use the RMT peripheral to capture a few bytes, then in code try to see if you can detect the baudrate, then see if the stop bits match up with the word length you selected, then see if any parity works.