DMAv1 demo for STM32

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
Post Reply
User avatar
aGuegu
Posts: 29
Joined: Thu Dec 07, 2017 4:15 am
Has thanked: 1 time
Been thanked: 5 times

DMAv1 demo for STM32

Post by aGuegu »

DMA is widely used in normal drivers like UART, SPI, and I2c. I wish there can be a pure DMA example provided for STM32.

I am trying to implement a customized DMA channel, like M2P, memory to PWM exactly in my case. However I found DMA driver is missed in the HAL doc.

If I tried to call `dmaStreamAllocI` in main.c, the linker would complain about `undefined reference to `dmaStreamAllocI`.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: DMAv1 demo for STM32

Post by Giovanni »

Hi,

The DMA driver is only built if some other driver needs it. If you need to use it alone then define STM32_DMA_REQUIRED in your mcuconf.h or in Makefile.

It is not in the HAL documentation because it is an STM32-specific helper driver, its API is not meant to be portable across platforms.

Giovanni
User avatar
aGuegu
Posts: 29
Joined: Thu Dec 07, 2017 4:15 am
Has thanked: 1 time
Been thanked: 5 times

Re: DMAv1 demo for STM32

Post by aGuegu »

Thanks for pointing out the direction. :)
Post Reply