You are viewing an older revision! See the latest version

MODDMA

Table of Contents

    Import libraryMODDMA

    MODDMA GPDMA Controller New features: transfer pins to memory buffer under periodic timer control and send double buffers to DAC

    MODDMA takes the NXP MCU SW Application Team's standard library for the GPDMA and adapts it as a specific implementation for the Mbed using standard Mbed libraries where approipate. The original library was straight C where as MODDMA presents the GPDMA controller as a C++ object using multiple C++ classes as configuration. MODDMA also presents the API in a similar way to the standard Mbed libraries so Mbed community members and users will be familiar with "dropping in" a library and writing code to use it in a consistent "Mbed way".

    The LPC17xx GPDMA

    The GPDMA is presented at the hardware level as a set of registers that allow, at the basic level, the configuration of source, destination, length of data, bus width. Other settings are available but the main function is to take a block of data from one place and move it to another place without a large amount of intervention from the host CPU. Source and destination can be memory or peripheral registers and the GPDMA offers up to eight prioritised channels.

    The MODDMA implementation

    MODDMA takes the original NXP library concept of a controller that manages the hardware registers interface and a set of one or more (up to 8) DMA configurations. Each configuration specifies the source and destination types, length and addresses which the controller uses to manage the transfer. MODDMA extends this into an object based system where MODDMA is a single instance object that manages these configurations. Additionally, MODDMA adds to both the controller and each configuration features that Mbed users will be familiar, like attaching callbacks to let the user's program know when certain events occur.

    Each configuration is an object of type MODDMA_Config and the user creates these as required and passes them to the MODDMA manager.

    Additionally, MODDMA can be used by other libraries to add DMA functionality where it's needed. An example of this is MODSERIAL. If this library is compiled with MODDMA then additional methods are made available native to MODSERIAL for sending large block buffers out of a serial port/uart.

    ... more to come.


    All wikipages