mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Merge pull request #3349 from jflyper/bfdev-fix-dma-corruption-updated
F4 Fix UART TX DMA corruption
This commit is contained in:
commit
dbbd7aef4b
7 changed files with 94 additions and 45 deletions
|
@ -109,12 +109,9 @@ void uart_tx_dma_IRQHandler(dmaChannelDescriptor_t* descriptor)
|
|||
{
|
||||
uartPort_t *s = (uartPort_t*)(descriptor->userParam);
|
||||
DMA_CLEAR_FLAG(descriptor, DMA_IT_TCIF);
|
||||
DMA_Cmd(descriptor->ref, DISABLE);
|
||||
DMA_Cmd(descriptor->ref, DISABLE); // XXX F1 needs this!!!
|
||||
|
||||
if (s->port.txBufferHead != s->port.txBufferTail)
|
||||
uartStartTxDMA(s);
|
||||
else
|
||||
s->txDMAEmpty = true;
|
||||
uartTryStartTxDMA(s);
|
||||
}
|
||||
|
||||
// XXX Should serialUART be consolidated?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue