UART2 reception issue using 2 stop bits

ikerbelloso
Posts: 20
Joined: Wed Jul 27, 2016 7:34 am

UART2 reception issue using 2 stop bits

Postby ikerbelloso » Mon Mar 13, 2017 2:45 pm

Hi all,

I'm facing some issues with UART2 while trying to communicate using a 2 stop bit length configuration.
I've mapped UART2 signals to IO16 (Rx) and IO17 (Tx) and I'm using no flowcontrol.

While checking my UART2 communication shortcutting Rx and Tx signals, I've noticed that my ESP32 does not receive what it sends. This happens only when I use a 2 stop bit configuration, at any baudrate and parity. Everything is fine when using 1 or 1.5 stop bits. Using an oscilloscope I've checked that outgoing bytes are using a two stop bit configuration, so my shortcutted UART2 is also receiving the same bytes. However I'm not received what I'm sending. For example, sending a 0x01 always result in a 0x80 reception, a 0x43 is turned into a 0xA1, as if there was a reception sampling issue.

ESP-IDF's UART driver is prepared for a 2 stop bit configuration, however, the ESP32 technical manual (page 170) does not show this configuration in the UART_CONFIG0_REG register (UART_STOP_BIT_NUM bits).

Is there any known bug related to what I'm suffering?

Thanks and regards.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: UART2 reception issue using 2 stop bits

Postby ESP_Angus » Tue Mar 14, 2017 2:58 am

Hi ikerbelloso,

Yes, this is a hardware bug we came aware of about a week ago (UART 2 stop bit setting not working correctly). There's a software workaround for the UART driver being reviewed now, it should be in the IDF master branch in the next few days. Sorry for the inconvenience.

Angus

ikerbelloso
Posts: 20
Joined: Wed Jul 27, 2016 7:34 am

Re: UART2 reception issue using 2 stop bits

Postby ikerbelloso » Tue Mar 14, 2017 10:25 am

Thanks Angus for your answer.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: UART2 reception issue using 2 stop bits

Postby ESP_Angus » Wed Mar 15, 2017 11:16 am

This fix is now on github master branch, as of commit 10f6f234ff7cc2a88aa237d167d3df3320480b2c.

Who is online

Users browsing this forum: Bing [Bot] and 115 guests