CPE 323 Introduction to Embedded Computer Systems: DMA Controller

Slides:



Advertisements
Similar presentations
DMA Controller (8237 Programming Examples)
Advertisements

Chung-Ta King National Tsing Hua University
Chapter 10 Input/Output Organization. Connections between a CPU and an I/O device Types of bus (Figure 10.1) –Address bus –Data bus –Control bus.
8051 Core Specification.
ECE 447 Fall 2009 Lecture 9: TI MSP430 Interrupts & Low Power Modes.
Instructor: Dr Aleksandar Milenkovic Lecture Notes
CS-334: Computer Architecture
Chapter 11 Direct Memory Access (DMA)
Interrupts (contd..) Multiple I/O devices may be connected to the processor and the memory via a bus. Some or all of these devices may be capable of generating.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
Computer System Structures memory memory controller disk controller disk controller printer controller printer controller tape-drive controller tape-drive.
GURSHARAN SINGH TATLA PIN DIAGRAM OF 8085 GURSHARAN SINGH TATLA
Chapter 7 Input/Output Luisa Botero Santiago Del Portillo Ivan Vega.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
MSP430 Mixed Signal Microcontroller – Parte 2 Afonso Ferreira Miguel Source: slau056d – Texas instruments.
UBI >> Contents Lecture 10 Digital-to-Analogue Conversion & Direct Memory Access (DMA) MSP430 Teaching Materials Texas Instruments Incorporated University.
Lecture 11 Low Power Modes & Watchdog Timers
Using Direct Memory Access to Improve Performance
I/O Interfacing A lot of handshaking is required between the CPU and most I/O devices. All I/O devices operate asynchronously with respect to the CPU.
UBI >> Contents Lecture 6 Digital-to-Analogue Conversion, Direct Memory Access (DMA) & Hardware Multiplier MSP430 Teaching Materials Texas Instruments.
Direct Memory Access (DMA) Microprocessors I -1. Topics to be discussed  Basic DMA Concept Basic DMA Concept  DMA pins and timing DMA pins and timing.
Direct Memory Access Module MTT M DIRECT MEMORY ACCESS MODULE (DMA)
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Module Introduction Purpose  This training module provides an overview of the peripherals.
Unit - 2 DMA 8237A-5.
CH10 Input/Output DDDData Transfer EEEExternal Devices IIII/O Modules PPPProgrammed I/O IIIInterrupt-Driven I/O DDDDirect Memory.
1 ARM University Program Copyright © ARM Ltd 2013 Using Direct Memory Access to Improve Performance.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Module 11 Adapted By and Prepared James Tan © 2001.
ECE 447 Fall 2009 Lecture 7: MSP430 Polling and Interrupts.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Direct Memory Access (DMA). DMA Features  7 independently configurable channels  Software programmable priorities: Very high, High, Medium or Low. 
Group 1 chapter 3 Alex Francisco Mario Palomino Mohammed Ur-Rehman Maria Lopez.
CPE 323 Introduction to Embedded Computer Systems: The MSP430X Architecture Instructor: Dr Aleksandar Milenkovic.
EE 345S Real-Time Digital Signal Processing Lab Fall 2008 Lab #3 Generating a Sine Wave Using the Hardware & Software Tools for the TI TMS320C6713 DSP.
COURSE OUTCOMES OF Microprocessor and programming
Microcontrollers & GPIO
Mon. Oct 2 Announcements Quiz Postponed to Wednesday – still only on 2.a + 2.b Video lecture for 2.a posted Lab 6 experiment extension You must come to.
UNIT – Microcontroller.
Direct Memory address and 8237 dma controller LECTURE 6
Interrupts In 8085 and 8086.
Introduction of microprocessor
Computer System Overview
DMA CONTROLLER 8257 Features: It is a 4-channel DMA.
Chapter 3 Top Level View of Computer Function and Interconnection
RX Compare Match Timer (CMT)
RX Data Transfer Controller (DTC)
E3165 DIGITAL ELECTRONIC SYSTEM
EE 445S Real-Time Digital Signal Processing Lab Spring 2017
Subject Name: Microcontroller Subject Code: 10ES42
AT91 Memory Interface This training module describes the External Bus Interface (EBI), which generatesthe signals that control the access to the external.
Computer System Overview
Lecture 18 Interrupt 동국대학교 홍유표.
8237 DMA CONTROLLER.
Module 2: Computer-System Structures
Architectural Overview
EE 445S Real-Time Digital Signal Processing Lab Fall 2013
8237 DMA CONTROLLER.
X1 & X2 These are also called Crystal Input Pins.
Lecture 9: TI MSP430 Interrupts & Low Power Modes
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Module 2: Computer-System Structures
8253 – PROGRAMMABLE INTERVAL TIMER (PIT). What is a Timer? Timer is a specialized type of device that is used to measure timing intervals. Timers can.
NS Training Hardware.
Computer System Overview
Module 2: Computer-System Structures
Module 2: Computer-System Structures
Presentation transcript:

CPE 323 Introduction to Embedded Computer Systems: DMA Controller Instructor: Dr Aleksandar Milenkovic Lecture Notes Alex Milenkovich

MSP430: System Architecture Outline MSP430: System Architecture ADC12 Module DAC12 Module CPE 323 Alex Milenkovich

DMA Controller Introduction Direct memory access (DMA) controller transfers data from one address to another, without CPU intervention, across the entire address range. Can move data from the ADC12 conversion memory to RAM Can move data from RAM to DAC12 Devices that contain a DMA controller may have one, two, or three DMA channels available Using the DMA controller can increase the throughput of peripheral modules. It can also reduce system power consumption by allowing the CPU to remain in a low-power mode without having to awaken to move data to or from a peripheral CPE 323

MSP430 DMA Features Up to three independent transfer channels Configurable DMA channel priorities Requires only two MCLK clock cycles per transfer Byte or word and mixed byte/word transfer capability Block sizes up to 65535 bytes or words Configurable transfer trigger selections Selectable edge or level-triggered transfer Four addressing modes Single, block, or burst-block transfer modes Configured from software CPE 323

DMA Block Diagram CPE 323 Alex Milenkovich

DMA Addressing Modes Configured with the DMASRCINCRx and DMADSTINCRx control bits DMASRCINCRx/ DMADSTINCRx bits select if the source/destination address is incremented, decremented, or unchanged after each transfer Transfers may be byte-to-byte, word-to-word, byte-to-word, or word-to-byte Word-to-byte: only the lower byte of the source-word is transferred Byte-to-word: the upper byte of the destination-word is cleared when the transfer occurs CPE 323 Alex Milenkovich

DMA Transfer Modes Single/Repeated single modes: each byte/word transfer requires a separate trigger Block/Repeated block modes: a transfer of a complete block of data occurs after one trigger CPU is halted until the complete block has been transferred Burst-block/Repeated burst-block modes: transfers are block transfers with CPU activity interleaved. CPU executes 2 MCLK cycles after every four byte/word transfers of the block resulting in 20% CPU execution capacity CPE 323

DMA Trigger Operation DMAxTSELx bits select trigger Edge-sensitive or level-sensitive CPE 323

DMA Trigger Operation (cont’d) CPE 323

DMA Channel Priorities Default DMA channel priorities are DMA0−DMA1−DMA2 If two or three triggers happen simultaneously or are pending, the channel with the highest priority completes its transfer (single, block or burst-block transfer) first, then the second priority channel, then the third priority channel. Transfers in progress are not halted if a higher priority channel is triggered The higher priority channel waits until the transfer in progress completes before starting DMA channel priorities are configurable with the ROUNDROBIN bit (see below) CPE 323

DMA Transfer Cycle Times If the MCLK source is active, but the CPU is off, the DMA controller will use the MCLK source for each transfer, without re-enabling the CPU. If the MCLK source is off, the DMA controller will temporarily restart MCLK, sourced with DCOCLK, for the single transfer or complete block or burst-block transfer The CPU remains off, and after the transfer completes, MCLK is turned off. DMA requires 1 or 2 MCLK cc to synchronize before each single transfer or complete block or burst-block transfer Each byte/word transfer requires 2 MCLK after synchronization, and one cycle of wait time after the transfer DMA cycle time is dependent on the MSP430 operating mode and clock system setup (use MCLK) CPE 323

DMA and Interrupts DMA transfers are not interruptible by system interrupts. System interrupts remain pending until the completion of the transfer NMI interrupts can interrupt the DMA controller if the ENNMI bit is set System interrupt service routines are interrupted by DMA transfers If an interrupt service routine or other routine must execute with no interruptions, the DMA controller should be disabled prior to executing the routine Each DMA channel has its own DMAIFG flag Each DMAIFG flag is set in any mode, when the corresponding DMAxSZ register counts to zero. If the corresponding DMAIE and GIE bits are set, an interrupt request is generated CPE 323

DMA and Other Devices USCI_B I2C Module ADC12 DAC12 Writing to Flash CPE 323