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.
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

Postby aGuegu » Sat Nov 23, 2019 11:39 pm

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: 12749
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 696 times
Been thanked: 573 times
Contact:

Re: DMAv1 demo for STM32

Postby Giovanni » Sun Nov 24, 2019 6:19 am

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

Postby aGuegu » Mon Nov 25, 2019 3:59 am

Thanks for pointing out the direction. :)


Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 4 guests