Re: How to enable DMA transfers for UART?
Heytoggle quoted messageShow quoted text
I done a demo driver implementation:
Some problems I was facing:
- DMA API: the current one doesn't support ring buffer setups
- UART API: the current API is not mapping the IDLE event.
- UART API: no callbacks possible for event driven rx
With the current design of the UART and DMA API it seems to be challenging to get a nice fusion.
So I was implementing a simple API for the demo, making block writes possible and calling a callback when data is received. I didn't used the UART and DMA API because it would became a dirty hack, while calling functions form that API & overwriting/patching the ISRs. So I decided for a lean straight forward implementation.
In my case I am interested into SPI + DMA and USB ACM + DMA. From an energy perspective it is much better to use DMA transfers for the peripheral IOs (We can put the MCU to sleep).
Maybe it is worth to put a thought on using DMA for peripherals by default and only the special case is doing polling or RX/TX handling via uart etc. ISRs.
On 20/03/2019 15:37, Paul Sokolovsky wrote: