Multiple calls to UART::DMA_Rx_IRQ_callback
Opened this issue · 1 comments
In the UART code, you currently have both the USART and the DMA peripherals calling UART::DMA_Rx_IRQ_callback
on interrupt. The USART is configured to fire on RXNE
(byte received) and the DMA is configured to fire on TC
(transfer complete).
The code in UART::DMA_Rx_IRQ_callback
seems to be resilient to multiple calls (i.e., no data seems to be re-read or lost), but it seems redundant. Can you help me understand why you decided to hook up both interrupts?
Haha, yeah, this is kinda weird
The DMA callback only fires when the transfer completes, when the buffer fills, or when it half-fills. In testing, I felt like this wasn't often enough and would often be waiting for bytes. The USART_RXNE interrupt fires much more often, so I used that as well.