element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Blog DMA move a table in memory with MSPM0
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 23 May 2026 1:43 PM Date Created
  • Views 88 views
  • Likes 4 likes
  • Comments 3 comments
  • MSPM0L1105
  • MSPM0
  • easyL1105
  • mspm0_dma
  • texas_instruments
  • texas instruments
  • arm
  • launchpad
  • ti
Related
Recommended

DMA move a table in memory with MSPM0

Jan Cumps
Jan Cumps
23 May 2026
DMA move a table in memory with MSPM0

The DMA engine of the MSPM0 can move data between memory locations. In this example, a table of data is DMA-moved to address locations in SRAM. The name of the example in TI resource explorer is dma_table_transfer.

DMA is set up in extended data table transfer mode.

image

In this mode, the source table exists of records that contain the data value, and the SRAM destination address where DMA should copy the data to.

image
image source: MSPM0 Academy

The destination are 4 variables. This is where the DMA engine will eventually copy the table data to.

#define DMA_TABLE_ENTRIES (4)

volatile uint32_t gDstData1;
volatile uint32_t gDstData2;
volatile uint32_t gDstData3;
volatile uint32_t gDstData4;

The source table is memory array with each time a value and destination address:

__attribute__((aligned(8)))
const uint32_t gTableData[DMA_TABLE_ENTRIES * 2] = {
    (uint32_t) &gDstData1, 0x10101010, 
    (uint32_t) &gDstData2, 0x20202020, 
    (uint32_t) &gDstData3, 0x30303030, 
    (uint32_t) &gDstData4, 0x40404040
};

image

The DMA engine initialisation code is simple. Note that there are other initialisation settings done in the system configurator.

    /* Configure DMA source, destination and size */
    DL_DMA_setSrcAddr(DMA, DMA_CH0_CHAN_ID, (uint32_t) &gTableData[0]);
    DL_DMA_setDestAddr(DMA, DMA_CH0_CHAN_ID, (uint32_t) &gTableData[0]);
    DL_DMA_setTransferSize(DMA, DMA_CH0_CHAN_ID, DMA_TABLE_ENTRIES);
    DL_DMA_enableChannel(DMA, DMA_CH0_CHAN_ID);

    /* Setup interrupts on device */
    DL_SYSCTL_disableSleepOnExit();
    NVIC_EnableIRQ(DMA_INT_IRQn);

image

In the config, source length is 8 bytes and target length 4. In reality, the data size is 4 bytes for both. But the source record also contains the destination address.

The actual move is a single call. An interrupt is thrown when the copy is complete:

   /* Start fill data */
    DL_DMA_startTransfer(DMA, DMA_CH0_CHAN_ID);

image

The interrupt handler in the example sets a global variable, so that the firmware can check if the work is done:

void DMA_IRQHandler(void)
{
    /* Example interrupt code -- just used to break the WFI in this example */
    switch (DL_DMA_getPendingInterrupt(DMA)) {
        case DL_DMA_EVENT_IIDX_DMACH0:
            gChannel0InterruptTaken = true;
            break;
        default:
            break;
    }
}

That's it. TI's example code includes integrity checks, for demo purposes. Read the full code in the resource explorer.

I've attached the project for the EasyL1105 and MSPM0L1306 Launchpad:

dma_table_transfer_MSPM0L1105.zip

dma_table_transfer_MSPM0L1306.zip

Enjoy.

Related posts

DMA specific

  • Sign in to reply
  • Jan Cumps
    Jan Cumps 3 days ago

    Link to posts that use DMA: 

    DMA specific

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz 3 days ago

    Great work! I've been meaning to experiment with DMA capability too, but have not got around to it yet. This will help loads.

    I have to say, I really like the general architecture of these microcontrollers, and how TI have assisted the developer with their excellent graphical utility (also available standalone). I guess one major thing they're retained from the MSP430 heritage, is that TI seem to have aimed to create as much ease-of-use as possible, given that ARM Cortex-M is inherently more complex than those last-century processors (MSP430 was launched in 1992 apparently!).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB 3 days ago

    Great update Jan.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube