2020-08-31 12:02 AM
Why should I clear the DMAR bit in the UART DMA receive interrupt subroutine?
At the moment I disable the DMA TC interrupt and the DMA Mode for reception (DMAR) at the top of my interrupt routine.
At the end of the subroutine I enable the uart dma receiver again.
This code works well.
But If I do not disable the DMA Mode for reception (DMAR) it does no longer work properly but I don't know why this makes such a difference?
Any thought on that topic?
Kind regards Mathias
2020-08-31 06:11 AM
The answer to your question will depend on your code. You certainly don't need to clear it in general. If you're receiving a fixed length message, you should clear it and re-initialize the next transfer.
2020-08-31 06:59 AM
Thanks for the reply!
Yes, I receive a fixed length message. But still, why should I clear it. It is nothing written that this flag resets something?
2020-08-31 10:09 AM
> The answer to your question will depend on your code.
JW