drivers: serial: uart driver for stm32U5 suspends dma channel
When DMA transfer is enabled on the stm32U5, the UART Tx channel must be suspended before stopping. This will let the on-going transfer ends properly Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
parent
0300b34cf0
commit
e00f91da41
1 changed files with 3 additions and 0 deletions
|
@ -1377,6 +1377,9 @@ static int uart_stm32_async_tx_abort(const struct device *dev)
|
|||
data->dma_tx.counter = tx_buffer_length - stat.pending_length;
|
||||
}
|
||||
|
||||
#if DT_HAS_COMPAT_STATUS_OKAY(st_stm32u5_dma)
|
||||
dma_suspend(data->dma_tx.dma_dev, data->dma_tx.dma_channel);
|
||||
#endif /* st_stm32u5_dma */
|
||||
dma_stop(data->dma_tx.dma_dev, data->dma_tx.dma_channel);
|
||||
async_evt_tx_abort(data);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue