Page 1 of 1

DMAv1 demo for STM32

Posted: Sat Nov 23, 2019 11:39 pm
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`.

Re: DMAv1 demo for STM32

Posted: Sun Nov 24, 2019 6:19 am
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

Re: DMAv1 demo for STM32

Posted: Mon Nov 25, 2019 3:59 am
by aGuegu
Thanks for pointing out the direction. :)