Skip to content

ESP32: calling uart_configure causes a falling- and raising-edge on the UART Tx Pin #93163

@SamsonBox

Description

@SamsonBox

Describe the bug

Calling uart_configure on a ESP32 UART2 device causes a falling- followed raising-edge (negative pulse, white line in the picture) on the UART Tx line. This leeds, depending on the configuration of the receiver to a read of 0xFF. Also running the w1 protocoll, using the UART, is not possible. This negative pulse completly destroys the w1 protocol, as the baudrate need to be reconfigured between the reset and the normal operation.

Image

Regression

  • This is a regression.

Steps to reproduce

  1. Use the ESP32 blinky example.
  2. Add &uart2 { status = "okay";}; to the devicetree.
  3. Add / {aliases {myuart = &uart2;}; to the devicetree.
  4. Add #include <zephyr/drivers/uart.h> to the main.c.
  5. Add #define DEV_UART DEVICE_DT_GET(DT_ALIAS(myuart )) before main.
  6. Add struct uart_config uart_cfg; uart_cfg.baudrate = 9600u; uart_cfg.parity = UART_CFG_PARITY_NONE; uart_cfg.data_bits = UART_CFG_DATA_BITS_8; uart_cfg.stop_bits = UART_CFG_STOP_BITS_1; uart_cfg.flow_ctrl = UART_CFG_FLOW_CTRL_NONE; uart_configure(DEV_UART , &uart_cfg); in the main loop.
  7. Use a logic analyzer or a oszilloscope observe the UART2 Tx Line (Tx2 on the devkit eval board)

Relevant log output

Impact

Major – Severely degrades functionality; workaround is difficult or unavailable.

Environment

  • OS: Windows
  • Toolchain: Zephyr SDK
  • Commit: 2c851d9

Additional Context

"zephyr,w1-serial" driver is not working due to this.

Metadata

Metadata

Assignees

Labels

bugThe issue is a bug, or the PR is fixing a bugplatform: ESP32Espressif ESP32

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions