Skip to content

Two Stop Bit RX Problem #435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
claudeheintz opened this issue Jun 12, 2017 · 6 comments
Closed

Two Stop Bit RX Problem #435

claudeheintz opened this issue Jun 12, 2017 · 6 comments

Comments

@claudeheintz
Copy link
Contributor

claudeheintz commented Jun 12, 2017

Serial settings with two stop bits do not work properly with UART RX.

Is it possible to modify uartBegin in esp32-hal-uart.c to include the new workaround for two stop bits in the latest IDF, something like this.

324  uartFlush(uart);
325  uartSetBaudRate(uart, baudrate);
326  UART_MUTEX_LOCK();
327  
328  uart->dev->conf0.val = config;
329
330  //begin mod ****************************************************
331  // workaround for two stop bits hardware issue
332  // if 2 stop bits, set conf0.stop_bit_num to 1 and set conf delay 1 bit
333  // see https://github.com/espressif/esp-idf/blob/master/components/driver/uart.c  lines 118-127
334
335	 if ( uart->dev->conf0.stop_bit_num == TWO_STOP_BITS_CONF) {
336	    uart->dev->conf0.stop_bit_num = ONE_STOP_BITS_CONF;
337	    uart->dev->rs485_conf.dl1_en = 1;
338	 }
339
340	 //end mod   ****************************************************
341
342	 UART_MUTEX_UNLOCK();
@me-no-dev
Copy link
Member

can you submit a PR for this? I can also do it manually

@claudeheintz
Copy link
Contributor Author

I haven't forked/done a pull request. But, I'll try it later today

@lonerzzz
Copy link
Contributor

@claudeheintz I believe that this fix is in place in the current code. Can you confirm? Is the issue fixed for you?

@claudeheintz
Copy link
Contributor Author

claudeheintz commented Aug 16, 2017 via email

@claudeheintz
Copy link
Contributor Author

claudeheintz commented Aug 17, 2017 via email

@me-no-dev
Copy link
Member

good catch @claudeheintz

Raienryu97 pushed a commit to Raienryu97/arduino-esp32 that referenced this issue Aug 18, 2017
blue-2357 pushed a commit to blue-2357/arduino-esp32 that referenced this issue Jul 17, 2024
dash0820 added a commit to dash0820/arduino-esp32-stripped that referenced this issue Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants