arduino / arduino/ArduinoCore-API
Should provide DMA library
- Dominant language
- C++
- Stars
- 306
- Forks
- 150
- PR merge metrics
- No merged PRs in 30d
Description
The SAMD core supports DMA, but this cannot be easily used from a library or sketch currently. In particular, multiple users of the DMA module need some coordination about what channels are in use, where the descriptor memory is located (I think), when to reset the DMA controller, etc.
Currently, I think there is the [Adafruit_ZeroDMA](https://github.com/adafruit/Adafruit_ZeroDMA) library that does this, but the [I2S library](https://github.com/arduino/ArduinoCore-samd/blob/master/libraries/I2S/src/utility/DMA.h) also has a DMA coordinator embedded (so these two will not play together nicely).
A single official library contained in the core (or perhaps an API contained in the core itself) would be good here. This could be a fully featured DMA library, but it might also be useful to have a minimal DMA coordinator library (that e.g. only handles resetting/initializing the controller, allocating channels and descriptors and maybe more, leaving all the channel-specific configuration that can coexist to third party or other libraries).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing the Adafruit_ZeroDMA library with libraries/I2S/src/utility/DMA.h, focusing on channel allocation, descriptor storage, controller reset, and coexistence between users. Determine whether a core-contained library or API best fits the hardware-independent ArduinoCore-API, and define done as a documented design that lets multiple DMA-using libraries coexist without conflicting resources.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100