Commit Graph

44 Commits

Author SHA1 Message Date
Song Ruo Jing 8c9f364f3a fix(uart): Avoid division by zero error when calling uart_get_baudrate
If uart_driver_install is not called before uart_get_baudrate,
the UART port may not be ready. In such cases, the register values
cannot be read out, leading to a division by zero error in uart_ll_get_baudrate.
This commit adds a check to ensure the UART port is enabled before
attempting to read its registers.

Closes https://github.com/espressif/esp-idf/issues/17513
2026-02-25 11:31:04 +08:00
Song Ruo Jing d5f928c13d fix(uart): tx write bytes fails to use non-default tx fifo empty threshold
Users may see tx write bytes fails to feed data into tx fifo in time
even if the tx fifo empty threshold has been set to a large value.
2026-02-25 11:31:04 +08:00
Song Ruo Jing 432e992038 fix(uart): fix some uart port generate a RX BRK_DET intr on reset issue
Issue saw on S3 UART2 and some LP_UART ports
2025-11-24 17:06:36 +08:00
Song Ruo Jing 2b69944222 fix(uart): correct uart_get_tx_buffer_free_size calculation
Modified a bit on the TX ring buffer push size logic

 Closes https://github.com/espressif/esp-idf/issues/15859
2025-11-24 17:06:36 +08:00
Song Ruo Jing b888adadae fix(uart): fix release pin logic if switching only one pin 2025-11-24 17:06:29 +08:00
C.S.M 7d3447ad48 feat(uhci): Add uhci (uart-dma) support on current chips 2025-09-25 10:48:31 +08:00
Song Ruo Jing d353271537 fix(uart): eliminate garbled data on UART TX/RX line in sleep 2025-05-20 16:58:02 +08:00
Song Ruo Jing bd275c1da3 feat(uart): add pin release process to uart driver 2025-05-20 16:57:42 +08:00
Song Ruo Jing 8b0d4a17e6 docs(uart): improve set/get baud rate API docs
Closes https://github.com/espressif/esp-idf/issues/15449
2025-05-20 15:43:24 +08:00
Song Ruo Jing ce808b09cd fix(uart): LP UART does not have the pre-divider for its clock source
Closes https://github.com/espressif/esp-idf/issues/15427
2025-03-07 21:49:20 +08:00
Song Ruo Jing fe62246f5a fix(uart): fix incorrect IO configuration for TX and RX configure to the same pin 2025-01-13 14:48:33 +08:00
Song Ruo Jing fd55869f82 fix(uart): allow same pin for tx and rx in uart_set_pin
Closes https://github.com/espressif/esp-idf/issues/14787
2025-01-09 12:04:45 +08:00
Song Ruo Jing b0d6ba527f fix(uart): fix race condition with the use of UART_SELECT_READ_NOTIF
UART_SELECT_READ_NOTIF needs to be sent after received data got processed
to avoid the potential race condition
2025-01-09 11:45:31 +08:00
Song Ruo Jing 5dd2f38eb4 fix(uart): eliminated potential glitch on TX at setup if TX signal is inversed
Closes https://github.com/espressif/esp-idf/issues/14285
2024-12-25 14:37:29 +08:00
wuzhenghui 69baf86cf4 change(esp_hw_support): collect retention link priority definition 2024-08-26 11:40:07 +08:00
Song Ruo Jing 457e0818e9 fix(uart): fix uart_config_t structure size difference in C and C++ 2024-07-31 16:52:05 +08:00
Song Ruo Jing 707aebc607 feat(uart): support uart module sleep retention on c6/h2 2024-06-18 15:04:20 +08:00
morris 771ae77c9b Merge branch 'bugfix/forbid_uart_suspend_auto_lightsleep_v5.2' into 'release/v5.2'
uart: Fixed issue that TX be blocked by auto-lightsleep (v5.2)

See merge request espressif/esp-idf!31108
2024-06-14 11:51:29 +08:00
zwx e69714c34f fix(uart): remove unnecessary wait when sending message to ring buffer 2024-06-07 11:42:35 +08:00
LiPeng 9b0d803237 fix(uart): Fixed issue that TX be blocked by auto-lightsleep 2024-05-28 10:57:59 +08:00
Song Ruo Jing 15962a953a fix(uart): Fix mismatch wakeup rising edges required with the threshold configured
Closes https://github.com/espressif/esp-idf/issues/12586
2024-04-24 16:25:54 +08:00
Song Ruo Jing c55a07bf57 refactor(uart): add support to be able to test LP_UART port
Increase LP_UART_EMPTY_THRESH_DEFAULT value to 4. The original value
could cause the FIFO become empty before filling next data into the FIFO
when the buadrate is high. TX_DONE interrupt would raise before actual
transmission complete in such case.
2024-04-15 19:39:30 +08:00
Song Ruo Jing be27966ce9 change(uart): improved the internal logic of uart_read_bytes
Ringbuffer usage becomes more efficient with the use of xRingbufferReceiveUpTo

Closes https://github.com/espressif/esp-idf/issues/12386
2023-12-06 11:39:31 +08:00
Song Ruo Jing 55ed548cc6 fix(console): enable to select UART1 port for console output
This feature was only enabled for esp32, esp32s2, esp32s3 previously.
Now, enabling this feature for all targets.
2023-11-30 11:26:09 +08:00
sonika.rathi 45d801d815 fix(vfs/uart): add UART VFS select callback in IRAM
UART VFS select callback is placed in IRAM when CONFIG_UART_ISR_IN_IRAM is enabled
2023-11-21 10:26:25 +01:00
gaoxu bc2a6bd730 feat(uart): spilt LP and HP uart set_baudrate function 2023-10-08 10:10:02 +08:00
gaoxu 4f24f805cc feat(uart): add LP-UART GPIO support 2023-10-08 10:10:02 +08:00
gaoxu 4541ad134d feat(uart): add RCC atomic block to uart/lp-uart peripheral 2023-10-08 10:10:02 +08:00
gaoxu c7afa0dcef feat(uart): uart(hp,lp) support on esp32p4 2023-10-08 10:10:00 +08:00
Song Ruo Jing 767698b90d feat(uart): Add sdkconfig.ci.iram_safe test for UART driver 2023-08-30 11:30:03 +08:00
morris 4a45479336 refactor(lp_periph): move enable and reset control to LL driver 2023-08-28 05:17:56 +00:00
Darian Leung 9ed58bf564 feat(driver): updated drivers to use CreateWithCaps() API
This commit simplifies various drivers by using the ...CreateWithCaps() API
when creating driver objects in internal RAM.
2023-08-08 04:26:42 +00:00
Darian Leung 6fc935e584 refactor(freertos): Refactor usage of portBASE_TYPE to BaseType_t
portBASE_TYPE is an internal macro defined by the porting layer. This commit
changes all references to BaseType_t which is the official type exposed by
FreeRTOS.
2023-07-31 17:10:34 +02:00
morris 57651c5997 Merge branch 'bugfix/log-related-warnings' into 'master'
driver: fixed log related warnings in i2s and uart

See merge request espressif/esp-idf!24720
2023-07-13 18:09:56 +08:00
Zim Kalinowski 33e2985b95 driver: fixed log related warnings in i2s and uart 2023-07-12 15:50:06 +08:00
Sonika Rathi 571831b2ee UART: UART_SELECT_WRITE_NOTIF event added in UART driver
Closes https://github.com/espressif/esp-idf/issues/10986
2023-07-12 09:19:41 +02:00
Song Ruo Jing 921713fff4 uart: Support LP_UART port with UART driver on esp32c6 2023-06-16 07:31:40 +00:00
Song Ruo Jing a4e8960ab4 esp_clk_tree: Rename clk_tree_xxx to esp_clk_tree_xxx, add compilation warning to clk_tree.h 2023-04-25 14:12:06 +08:00
Song Ruo Jing 3f2bed1f5c uart: Allow the users to not specify the source_clk in uart_config_t when calling uart_param_config 2023-04-17 15:43:06 +08:00
Linda cafd3ab4c1 update brief of uart_set_wakeup_threshold 2023-03-31 10:58:02 +08:00
Bradley McFadden 6a21403cba uart: Correct typo in referenced function name
The functions `uart_enable_pattern_det_intr` have been renamed to `uart_enable_pattern_det_baud_intr`, but a reference to these functions in the programming guide was not updated.

Merges https://github.com/espressif/esp-idf/pull/10856
2023-03-01 12:19:07 +08:00
Song Ruo Jing b69f983525 uart: Fix two TX concurrency issues
1. Concurrency might cause ESP_ERR_TIMEOUT when calling uart_wait_tx_done
2. Concurrency might cause RTS line being de-assreted during tx transmission for rs485 mode
2023-02-08 14:24:43 +08:00
Kevin (Lao Kaiyao) 421e5e6416 Merge branch 'refactor/pack_driver_source_files' into 'master'
components/driver: pack peripherals

See merge request espressif/esp-idf!22173
2023-02-07 10:20:57 +08:00
laokaiyao f27cd67c00 driver: pack peripherals 2023-02-02 18:19:58 +08:00