mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
Merge branch 'bugfix/fix_uart_fake_tx_done_v4.4' into 'release/v4.4'
uart: Fix unwanted processing of TX_DONE interrupt immediately after calling uart_wait_tx_done() (backport v4.4) See merge request espressif/esp-idf!20314
This commit is contained in:
@@ -1146,6 +1146,9 @@ esp_err_t uart_wait_tx_done(uart_port_t uart_num, TickType_t ticks_to_wait)
|
|||||||
xSemaphoreGive(p_uart_obj[uart_num]->tx_mux);
|
xSemaphoreGive(p_uart_obj[uart_num]->tx_mux);
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
if (!UART_IS_MODE_SET(uart_num, UART_MODE_RS485_HALF_DUPLEX)) {
|
||||||
|
uart_hal_clr_intsts_mask(&(uart_context[uart_num].hal), UART_INTR_TX_DONE);
|
||||||
|
}
|
||||||
UART_ENTER_CRITICAL(&(uart_context[uart_num].spinlock));
|
UART_ENTER_CRITICAL(&(uart_context[uart_num].spinlock));
|
||||||
uart_hal_ena_intr_mask(&(uart_context[uart_num].hal), UART_INTR_TX_DONE);
|
uart_hal_ena_intr_mask(&(uart_context[uart_num].hal), UART_INTR_TX_DONE);
|
||||||
UART_EXIT_CRITICAL(&(uart_context[uart_num].spinlock));
|
UART_EXIT_CRITICAL(&(uart_context[uart_num].spinlock));
|
||||||
|
Reference in New Issue
Block a user