1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>MINDmaConfig Structure</TITLE> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">MINDmaConfig Structure<IMG src="../../image/TWL.gif" width="24" height="12" border="0" align=middle></H1> 12<H2>Definition</H2> 13<DL> 14 <DD><PRE>#include <twl/mi.h> 15 16 typedef struct _MINDmaConfig 17 { 18 u32 intervalTimer; 19 u32 prescaler; 20 u32 blockWord; 21 u32 wordCount; 22 } 23 MINDmaConfig;</PRE> 24</DL> 25<H2>Members</H2> 26<P>The members of the <CODE>MINDmaConfig</CODE> structure are shown below.<BR> 27</P> 28<TABLE border="1"> 29 <TBODY> 30 <TR> 31<TH>Member Name</TH> 32<TH>Description</TH> 33<TH>Related Register</TH> 34<TH>Default Values</TH> 35 </TR> 36 <TR> 37<TD><CODE>intervalTimer</CODE></TD> 38<TD>Interval timer for block transfers.</TD> 39<TD>d15-0 in DMAxBCNT</TD> 40<TD><CODE>MI_NDMA_NO_INTERVAL</CODE></TD> 41 </TR> 42 <TR> 43<TD><CODE>prescaler</CODE></TD> 44<TD>Prescaler of interval timer for block transfers.</TD> 45<TD>d17-16 in DMAxBCNT</TD> 46<TD><CODE>MI_NDMA_INTERVAL_PS_1</CODE></TD> 47 </TR> 48 <TR> 49<TD><CODE>blockWord</CODE></TD> 50<TD>Number of words in the block transfer.</TD> 51<TD>d19-16 in DMAx_CNT</TD> 52<TD><CODE>MI_NDMA_BWORD_1</CODE></TD> 53 </TR> 54 <TR> 55<TD><CODE>wordCount</CODE></TD> 56<TD>Number of words in the transfer.</TD> 57<TD>DMAxWCNT</TD> 58<TD><CODE>MI_NDMA_AT_A_TIME</CODE></TD> 59 </TR> 60 </TBODY> 61</TABLE> 62<H2>Description</H2> 63<P><CODE>MINDmaConfig</CODE> is a structure that specifies the DMA behavior used in new DMA operations.</P> 64<P>There are many parameters that specify the behavior of the new DMA. Specifying all aspects of every behavior would cause the instruction length to be quite long, which in turn would be extremely troublesome. Consequently, the parts of these parameters that are unlikely to change during multiple DMA operations are gathered into the <CODE>MINDmaConfig</CODE> structure. By having applications refer to this structure during DMA operations, the burden on applications can be reduced.</P> 65<P>Each of the four new DMAs contains a <CODE>MINDmaConfig</CODE> structure internally. During DMA operations, either of the following operations can be selected.</P> 66<BLOCKQUOTE>(1) Accessing the <CODE>MINDmaConfig</CODE> structure maintained internally<BR>(2) Accessing the <CODE>MINDmaConfig</CODE> structure specified by the application </BLOCKQUOTE> 67<P> </P> 68<P>The functions that configure the internally maintained <CODE>MINDmaConfig</CODE> structure are the following:</P> 69<BLOCKQUOTE>The <CODE><A href="MI_InitNDmaConfig.html">MI_InitNDmaConfig</A></CODE> function, used to initialize the four internal structures<BR>The <CODE><A href="MI_SetNDmaConfig.html">MI_SetNDmaConfig</A></CODE> function, used to copy the specified <CODE>MINDmaConfig</CODE> structure to an internal structure<BR>The <CODE><A href="MI_SetNDmaInterval.html">MI_SetNDmaInterval</A></CODE> function, used to specify interval information for a particular internal structure<BR>The <CODE><A href="MI_SetNDmaBlockWord.html">MI_SetNDmaBlockWord</A></CODE> function, used to specify BlockWord information for a particular internal structure<BR>The <CODE><A href="MI_SetNDmaWordCount.html">MI_SetNDmaWordCount</A></CODE> function, used to specify <CODE>WordCount</CODE> information for a particular internal structure</BLOCKQUOTE> 70<P> The functions that get the information in the internal <CODE>MINDmaConfig</CODE> structure are the following:</P> 71<BLOCKQUOTE>The <CODE><A href="MI_GetNDmaConfig.html">MI_GetNDmaConfig</A></CODE> function, used to copy an internal structure to a specified region of memory<BR>The <CODE><A href="MI_GetNDmaIntervalTimer.html">MI_GetNDmaIntervalTimer</A></CODE> function, used to get the interval timer information for a particular internal structure<BR>The <CODE><A href="MI_GetNDmaIntervalPrescaler.html">MI_GetNDmaIntervalPrescaler</A></CODE> function, used to get the interval prescalar information for a particular internal structure<BR>The <CODE><A href="MI_GetNDmaBlockWord.html">MI_GetNDmaBlockWord</A></CODE> function, used to get the <CODE>BlockWord</CODE> information of a particular internal structure<BR>The <CODE><A href="MI_GetNDmaWordCount.html">MI_GetNDmaWordCount</A></CODE> function, used to get the <CODE>WordCount</CODE> information of a particular internal structure</BLOCKQUOTE> 72<P> The "interval information" mentioned in the set functions refers to the Interval Timer and Interval Prescaler information; both can be set simultaneously. For the get functions, two separate functions have been created to get these values individually.</P> 73<P>The internal structure will be initialized using the <CODE><A href="../../os/init/OS_Init.html">OS_Init</A></CODE> function, so the application doesn't have to handle the initialization at first. Call this function if it's necessary.</P> 74<P>If you want to perform a new DMA operation using different parameters than the default settings, but you don't want to change the internal structure, perform the following procedure: (1) copy over the <CODE>MINDmaConfig</CODE> structure, (2) overwrite the members of the <CODE>MINDmaConfig</CODE> structure, (3) specify that structure and perform the new DMA operation.</P> 75<P>If you want to change the actual value within the library's internal structure, either (1) copy <CODE>MINDmaConfig</CODE> and overwrite the necessary portions, then set the library to the structure, or (2) overwrite the necessary parameters directly using functions such as <CODE><A href="MI_SetNDmaInterval.html">MI_SetNDmaInterval()</A></CODE>.</P> 76<P><B><BR> (Example)</B> Copy the new DMA1 settings, overwrite the interval information (that is, the Interval Timer and Interval Prescaler information), and set that as the config [structure] for the new DMA1 [channel].</P> 77<BLOCKQUOTE style="background-color: #ffffcc;"><CODE><BR>MINDmaConfig config;<BR> <BR> <FONT color="#666633">//---- get config</FONT><BR> <FONT color="#ff0000">MI_GetNDmaConfig</FONT>( 1, &config );<BR> <BR> <FONT color="#666633">//---- change config values</FONT><BR> config.intervalTimer = 0x100;<BR> config.prescaler = MI_NDMA_INTERVAL_PS_16;<BR> <BR> <FONT color="#666633">//---- set config</FONT><BR> <FONT color="#ff0000">MI_SetNDmaConfig</FONT>( 1, &config );<BR> <BR></CODE></BLOCKQUOTE> 78<H2>See Also</H2> 79<P><CODE><A href="MI_InitNDmaConfig.html">MI_InitNDmaConfig</A><BR> <A href="MI_SetNDmaConfig.html">MI_SetNDmaConfig</A><BR></CODE></P> 80<H2>Revision History</H2> 81<P>2008/01/22 Initial version.</P> 82<hr><p>CONFIDENTIAL</p></body> 83</HTML>