Re: How to enable DMA transfers for UART?


Paul Sokolovsky
 

Hello Stefan,

On Tue, 19 Mar 2019 15:18:02 +0000
"Stefan Jaritz" <stefan@...> wrote:

Hey,

I am currently experimenting with ZephyrOS on different tasks. My
base is an own dev board which has a stm32f4xx MCU that connects
different ICs etc. via UART, I2C, SPI & GPIOs.

Currently the UART ISR is too slow to catch all chars at a rx burst.
Usually I am using UART + DMA transfers to relieve the MCU and save
energy.
[]

So I am asking for help or some example how to do an UART & DMA.

Think having an ringbuffer for rx and an intr firing after n Bytes
received via DMA. Also doing the tx via DMA would be perfect. Any
ideas to setup the Zephyr drivers to do so?
Recently, a new "async" UART API was added to Zephyr, whose
implementation could leverage DMA support (that was one of usecases for
this API). There's an open ticket to implement it for STM32:
https://github.com/zephyrproject-rtos/zephyr/issues/13955

You're welcome to cooperate with the STM32 maintainers on implementing
it.

[]

--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog

Join {devel@lists.zephyrproject.org to automatically receive all group messages.