Merge branch 'bugfix/uart_sw_flow_ctrl_xoff_char_v6.0' into 'release/v6.0'

fix(uart): fix uart sw flow ctrl XOFF char write to wrong reg on ESP32C6 (v6.0)

See merge request espressif/esp-idf!50524
This commit is contained in:
morris
2026-07-15 11:52:07 +08:00
13 changed files with 480 additions and 67 deletions
+2 -6
View File
@@ -2200,9 +2200,7 @@ esp_err_t uart_set_rx_full_threshold(uart_port_t uart_num, int threshold)
return ESP_ERR_INVALID_STATE;
}
UART_ENTER_CRITICAL(&(uart_context[uart_num].spinlock));
if (uart_hal_get_intr_ena_status(&(uart_context[uart_num].hal)) & UART_INTR_RXFIFO_FULL) {
uart_hal_set_rxfifo_full_thr(&(uart_context[uart_num].hal), threshold);
}
uart_hal_set_rxfifo_full_thr(&(uart_context[uart_num].hal), threshold);
UART_EXIT_CRITICAL(&(uart_context[uart_num].spinlock));
return ESP_OK;
}
@@ -2217,9 +2215,7 @@ esp_err_t uart_set_tx_empty_threshold(uart_port_t uart_num, int threshold)
return ESP_ERR_INVALID_STATE;
}
UART_ENTER_CRITICAL(&(uart_context[uart_num].spinlock));
if (uart_hal_get_intr_ena_status(&(uart_context[uart_num].hal)) & UART_INTR_TXFIFO_EMPTY) {
uart_hal_set_txfifo_empty_thr(&(uart_context[uart_num].hal), threshold);
}
uart_hal_set_txfifo_empty_thr(&(uart_context[uart_num].hal), threshold);
UART_EXIT_CRITICAL(&(uart_context[uart_num].spinlock));
return ESP_OK;
}