Skip to content Skip to navigation

Connexions

You are here: Home » Content » Laboratory DMA: Lab1 - Data Memory transfer triggered by software

Navigation

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

This content is ...

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • TI MSP430 display tagshide tags

    This module is included inLens: Texas Instruments MSP430
    By: Texas InstrumentsAs a part of collection: "Teaching and classroom laboratories based on the “eZ430” and "Experimenter's board" MSP430 microcontroller platforms and Code Composer Essentials"

    Comments:

    "This is an excerpt from the MSP430 Teaching CD produced under TI sponsorship and review at the University Beira Interior in Portugal. The material covers everything from "hello world" on an eZ430 […]"

    Click the "TI MSP430" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

Recently Viewed

This feature requires Javascript to be enabled.

Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.
 

Laboratory DMA: Lab1 - Data Memory transfer triggered by software

Module by: Pedro Dinis, António Espírito Santo, Bruno Ribeiro. E-mail the authors

Summary: Using the DMA controller included in the MSP-EXP430FG4618 Development Tool analysed the data transfer between two regions of memory.

Laboratory DMA: Lab1 - Data Memory transfer triggered by software

Introduction

This laboratory gives an example of the use of the DMA peripheral available in the MSP-EXP430FG4618 Development Tool. It requires the configuration of the DMA Source and Destination Addresses Registers, DMA Size Address Register; DMA Control Registers and DMA Channel 0 Control Register in order to transfer data between two regions of memory.

Overview

During this laboratory ( Lab1_DMA.c ), the data transfer between two regions of memory is analyzed. The order of transfer is controlled by software.

Resources

The following resource is used in this laboratory:

- DMA controller.

Software application organization

The software begins by disabling the watchdog timer. Port P2.1 is set as an output with a logic low level.

The memory addresses of the data vectors are passed to the source data address DMA0SA and destination address DMA0DA registers.

The number of words to be transferred is loaded in the DMA0SZ (size) register.

The DMA channel 0 is configured so that the data transfer trigger is controlled by software, in order that after each transfer, the source and destination addresses are correctly incremented.

The application enters an infinite loop, where port P2.1 state is switched just before initiating the data transfer.

System configuration

DMA channel configuration:

The source address and destination address of the data must be loaded into their respective registers:

DMA0SA = (void (*)( )) &tab_1; // Start block address
    
DMA0DA = (void (*)( )) &tab_2; // Destination block address
    

To move a total of 32 words, what is the value to write to the data size register?

DMA0SZ = 0x0020; // Block size

The DMA channel must be configured to transfer the word under software control. The source and destination addresses should be incremented immediately after each of the transfers.

DMA0CTL=DMADT_0 | DMASRCINCR_3 | DMADSTINCR_3 | DMAEN;
    // Single transfer,
    // DMA source and destination addresses increment,
    // Enable DMA0
    

Analysis of operation

In the Memory window, the addresses of data vector Tab_1 and Tab_2 addresses are displayed. The contents of these blocks must be identified in memory.

Add a breakpoint at line of code that performs the switching of port P2.1 state.

Execute the application, and whenever the breakpoint is reached, the execution of the application will be suspended. Observe the data being gradually transferred from source to destination.

The data transfer is suspended once the 32 elements of the source data vector have been transferred.

This example and many others are available on the MSP430 Teaching ROM.

Request this ROM, and our other Teaching Materials here https://www-a.ti.com/apps/dspuniv/teaching_rom_request.asp

Content actions

Download module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks