Re: How to enable DMA transfers for UART?


Li, Jun R
 

Stefan,
I've ever implemented a DMA-enabled UART on STM32F4 boards, but based on much old version of zephyr. I can try rebasing it to the latest zephyr if you are interested.

Regards,
Jun


´╗┐On 3/19/19, 08:18, "devel@lists.zephyrproject.org on behalf of Stefan Jaritz" <devel@lists.zephyrproject.org on behalf of stefan@kokoontech.com> 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.

I checked the UART stm32 api and saw that it is not utilizing things
like uart DMA transfers. But there is an complete DMA API available.
Yeah! Now I looked at the sample section to get a blueprint for doing
so. Ups! Nothing

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?

Kind regards!

Stefan

PS: there is an nice article on that here

http://stm32f4-discovery.net/2017/07/stm32-tutorial-efficiently-receive-uart-data-using-dma/

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