UART baudrate frame information auto detect?

zliudr
Posts: 194
Joined: Thu Oct 03, 2019 5:15 am

UART baudrate frame information auto detect?

Postby zliudr » Tue Jul 28, 2020 4:41 am

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.

ESP_Sprite
Posts: 3914
Joined: Thu Nov 26, 2015 4:08 am

Re: UART baudrate frame information auto detect?

Postby ESP_Sprite » Tue Jul 28, 2020 1:16 pm

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.

Who is online

Users browsing this forum: Google [Bot], JosuGZ and 25 guests