UART baudrate frame information auto detect?

zliudr
Posts: 357
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: 9048
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: No registered users and 162 guests