|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-97F97D7B-D5A3-5471-A359-77B805ED198C" xml:lang="en"><title>Design</title><shortdesc>Describes different modes of operations of the DMA Framework .</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
13 <p>Some DMA controllers provide several modes of operation. For example, one |
|
14 ASSP provides both single-buffer mode and scatter-gather mode transfers. </p> |
|
15 <p>There are two options: </p> |
|
16 <ul> |
|
17 <li id="GUID-EAFDBEFC-1524-55C4-BBD3-AF4CD88ADEF1"><p>Select a single mode |
|
18 of operation. </p> </li> |
|
19 <li id="GUID-ED15AB92-3A9B-5968-A5C9-E49309F14EE1"><p>Select a multiple mode |
|
20 of operation, and split the physical DMA controller into several logical controllers, |
|
21 one for each mode to be supported. If this option is chosen, the PSL must |
|
22 include one concrete controller class per logical controller; a controller |
|
23 class is derived from <xref href="GUID-25398075-927B-36E4-B953-16785EC4086C.dita"><apiname>TDmac</apiname></xref>. </p> <p>If the DMA controller |
|
24 supports more than one mode of operation, implement the simplest one first. |
|
25 Implementing single-buffer mode first allows most of the the PSL (platform-specific |
|
26 layer) to be debugged before you start to implement the more complex scatter-gather |
|
27 functionality. </p> </li> |
|
28 </ul> |
|
29 <p>One reference implementation adopts a mixed strategy; the mode of operation |
|
30 is selectable at build-time by defining the macro <codeph>__DESFETCHMODE__</codeph> to |
|
31 exercise and demonstrate two different modes of operation. </p> |
|
32 <p>Scatter-gather support is essentially a superset of single-buffer support |
|
33 because a scatter-gather list is an ordered set of variable sized buffers, |
|
34 and means that code shown here demonstrates the implementation of a scatter-gather |
|
35 DMA controller. </p> |
|
36 <p>Almost all modern MCUs use scatter-gather capable DMA controllers. Note |
|
37 that we refer to descriptor fetch mode synonymously with scatter-gather mode, |
|
38 as scatter-gather is implemented by passing the DMA controller a linked list |
|
39 of descriptors describing the buffers to be transferred. Non–descriptor mode |
|
40 requires that the DMA controller registers are programmed by software to describe |
|
41 the buffer transfer required. Since each transfer must be handled by an interrupt |
|
42 service routine triggered when the DMA controller has completed the transfer, |
|
43 non-descriptor mode is not capable of performing transfers past buffer boundaries. </p> |
|
44 </conbody></concept> |