Should provide DMA library

Open
#93 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp
Domain
embedded-iot

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.

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 library that does this, but the I2S library 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).

Dominant language
C++
Stars
306
Forks
150
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from arduino/ArduinoCore-API

All issues in arduino/ArduinoCore-API

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.