Skip to content

machine_uart.c: Call uart_wait_tx_done() only with installed driver.#18124

Merged
dpgeorge merged 1 commit intomicropython:masterfrom
robert-hh:esp32_uart_init
Sep 25, 2025
Merged

machine_uart.c: Call uart_wait_tx_done() only with installed driver.#18124
dpgeorge merged 1 commit intomicropython:masterfrom
robert-hh:esp32_uart_init

Conversation

@robert-hh
Copy link
Copy Markdown
Contributor

Summary

Call uart_wait_tx_done() only with installed driver. Otherwise an error message will pop up at the first instantiation of the UART object.

Addresses #18122 / #18123.

Testing

Tested with a ESP32 classic and ESP32C3. Test objective:

  • Verify the the error message disappeared. (ESP32 classic, ESP32C3)
  • Verify that an ongoing TX finishes when uart.init() is called while sending. (ESP32 classic).

Comment thread ports/esp32/machine_uart.c
Copy link
Copy Markdown
Member

@dpgeorge dpgeorge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating. Looks good now!

Otherwise an error message will pop up at the first instatiation
of the UART object.

Addresses micropython#18122 / micropython#18123.

Signed-off-by: robert-hh <robert@hammelrath.com>
@robert-hh
Copy link
Copy Markdown
Contributor Author

The last push just fixes the commit message format error.

@dpgeorge dpgeorge merged commit d0d9d97 into micropython:master Sep 25, 2025
9 checks passed
@robert-hh robert-hh deleted the esp32_uart_init branch September 25, 2025 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants