315 lines
38 KiB
HTML
315 lines
38 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.9.1"/>
|
|
<title>discoverpixy: discovery/libs/StmCoreNPheriph/src/stm32f4xx_dma.c File Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { init_search(); });
|
|
</script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td style="padding-left: 0.5em;">
|
|
<div id="projectname">discoverpixy
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.9.1 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|
<li>
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>File Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_84db96586f7d962b526d6d9627d831c2.html">discovery</a></li><li class="navelem"><a class="el" href="dir_07523c13f04fd35d8848cb17a371cb5b.html">libs</a></li><li class="navelem"><a class="el" href="dir_1d60ba7d807ff336a2be2f2de640bf2b.html">StmCoreNPheriph</a></li><li class="navelem"><a class="el" href="dir_12f7a99b9d2a0e5955a2ac990af20021.html">src</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#define-members">Macros</a> |
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">stm32f4xx_dma.c File Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>This file provides firmware functions to manage the following functionalities of the Direct Memory Access controller (DMA):
|
|
<a href="#details">More...</a></p>
|
|
<div class="textblock"><code>#include "<a class="el" href="stm32f4xx__dma_8h_source.html">stm32f4xx_dma.h</a>"</code><br />
|
|
<code>#include "<a class="el" href="stm32f4xx__rcc_8h_source.html">stm32f4xx_rcc.h</a>"</code><br />
|
|
</div><div class="textblock"><div class="dynheader">
|
|
Include dependency graph for stm32f4xx_dma.c:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="stm32f4xx__dma_8c__incl.png" border="0" usemap="#discovery_2libs_2_stm_core_n_pheriph_2src_2stm32f4xx__dma_8c" alt=""/></div>
|
|
<map name="discovery_2libs_2_stm_core_n_pheriph_2src_2stm32f4xx__dma_8c" id="discovery_2libs_2_stm_core_n_pheriph_2src_2stm32f4xx__dma_8c">
|
|
<area shape="rect" id="node2" href="stm32f4xx__dma_8h.html" title="This file contains all the functions prototypes for the DMA firmware library. " alt="" coords="2285,95,2410,121"/><area shape="rect" id="node20" href="stm32f4xx__rcc_8h.html" title="This file contains all the functions prototypes for the RCC firmware library. " alt="" coords="4021,319,4140,345"/><area shape="rect" id="node3" href="stm32f4xx_8h.html" title="CMSIS Cortex-M4 Device Peripheral Access Layer Header File. This file contains all the peripheral reg..." alt="" coords="2175,169,2269,196"/><area shape="rect" id="node4" href="core__cm4_8h.html" title="CMSIS Cortex-M4 Core Peripheral Access Layer Header File. " alt="" coords="350,244,441,271"/><area shape="rect" id="node9" href="system__stm32f4xx_8h.html" title="CMSIS Cortex-M4 Device System Source File for STM32F4xx devices. " alt="" coords="183,244,325,271"/><area shape="rect" id="node10" href="stm32f4xx__conf_8h_source.html" title="stm32f4xx_conf.h" alt="" coords="2285,244,2409,271"/><area shape="rect" id="node6" href="core__cm_instr_8h.html" title="CMSIS Cortex-M Core Instruction Access Header File. " alt="" coords="245,319,351,345"/><area shape="rect" id="node7" href="core__cm_func_8h.html" title="CMSIS Cortex-M Core Function Access Header File. " alt="" coords="375,319,487,345"/><area shape="rect" id="node8" href="core__cm4__simd_8h.html" title="CMSIS Cortex-M4 SIMD Header File. " alt="" coords="95,319,221,345"/><area shape="rect" id="node11" href="stm32f4xx__adc_8h.html" title="This file contains all the functions prototypes for the ADC firmware library. " alt="" coords="512,319,633,345"/><area shape="rect" id="node12" href="stm32f4xx__crc_8h.html" title="This file contains all the functions prototypes for the CRC firmware library. " alt="" coords="657,319,776,345"/><area shape="rect" id="node13" href="stm32f4xx__dbgmcu_8h.html" title="This file contains all the functions prototypes for the DBGMCU firmware library. " alt="" coords="801,319,947,345"/><area shape="rect" id="node14" href="stm32f4xx__exti_8h.html" title="This file contains all the functions prototypes for the EXTI firmware library. " alt="" coords="972,319,1093,345"/><area shape="rect" id="node15" href="stm32f4xx__flash_8h.html" title="This file contains all the functions prototypes for the FLASH firmware library. " alt="" coords="1117,319,1244,345"/><area shape="rect" id="node16" href="stm32f4xx__gpio_8h.html" title="This file contains all the functions prototypes for the GPIO firmware library. " alt="" coords="1268,319,1392,345"/><area shape="rect" id="node17" href="stm32f4xx__i2c_8h.html" title="This file contains all the functions prototypes for the I2C firmware library. " alt="" coords="1415,319,1533,345"/><area shape="rect" id="node18" href="stm32f4xx__iwdg_8h.html" title="This file contains all the functions prototypes for the IWDG firmware library. " alt="" coords="1557,319,1684,345"/><area shape="rect" id="node19" href="stm32f4xx__pwr_8h.html" title="This file contains all the functions prototypes for the PWR firmware library. " alt="" coords="1708,319,1827,345"/><area shape="rect" id="node21" href="stm32f4xx__rtc_8h.html" title="This file contains all the functions prototypes for the RTC firmware library. " alt="" coords="1851,319,1966,345"/><area shape="rect" id="node22" href="stm32f4xx__sdio_8h.html" title="This file contains all the functions prototypes for the SDIO firmware library. " alt="" coords="1991,319,2115,345"/><area shape="rect" id="node23" href="stm32f4xx__spi_8h.html" title="This file contains all the functions prototypes for the SPI firmware library. " alt="" coords="2138,319,2255,345"/><area shape="rect" id="node24" href="stm32f4xx__syscfg_8h.html" title="This file contains all the functions prototypes for the SYSCFG firmware library. " alt="" coords="2279,319,2418,345"/><area shape="rect" id="node25" href="stm32f4xx__tim_8h.html" title="This file contains all the functions prototypes for the TIM firmware library. " alt="" coords="2443,319,2561,345"/><area shape="rect" id="node26" href="stm32f4xx__usart_8h.html" title="This file contains all the functions prototypes for the USART firmware library. " alt="" coords="2585,319,2715,345"/><area shape="rect" id="node27" href="stm32f4xx__wwdg_8h.html" title="This file contains all the functions prototypes for the WWDG firmware library. " alt="" coords="2739,319,2871,345"/><area shape="rect" id="node28" href="misc_8h.html" title="This file contains all the functions prototypes for the miscellaneous firmware library functions (add..." alt="" coords="2895,319,2957,345"/><area shape="rect" id="node29" href="stm32f4xx__cryp_8h.html" title="This file contains all the functions prototypes for the Cryptographic processor(CRYP) firmware librar..." alt="" coords="2981,319,3106,345"/><area shape="rect" id="node30" href="stm32f4xx__hash_8h.html" title="This file contains all the functions prototypes for the HASH firmware library. " alt="" coords="3130,319,3258,345"/><area shape="rect" id="node31" href="stm32f4xx__rng_8h.html" title="This file contains all the functions prototypes for the Random Number Generator(RNG) firmware library..." alt="" coords="3283,319,3401,345"/><area shape="rect" id="node32" href="stm32f4xx__can_8h.html" title="This file contains all the functions prototypes for the CAN firmware library. " alt="" coords="3425,319,3547,345"/><area shape="rect" id="node33" href="stm32f4xx__dac_8h.html" title="This file contains all the functions prototypes for the DAC firmware library. " alt="" coords="3571,319,3692,345"/><area shape="rect" id="node34" href="stm32f4xx__dcmi_8h.html" title="This file contains all the functions prototypes for the DCMI firmware library. " alt="" coords="3717,319,3845,345"/><area shape="rect" id="node35" href="stm32f4xx__fsmc_8h.html" title="This file contains all the functions prototypes for the FSMC firmware library. " alt="" coords="3869,319,3997,345"/></map>
|
|
</div>
|
|
</div><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
|
|
Macros</h2></td></tr>
|
|
<tr class="memitem:ga65f8cdee3cc2302bafb0a32a15692a81"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><b>TRANSFER_IT_ENABLE_MASK</b></td></tr>
|
|
<tr class="separator:ga65f8cdee3cc2302bafb0a32a15692a81"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga0a11ce367da8e19eb27cf7f129da4b3d"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><b>DMA_Stream0_IT_MASK</b></td></tr>
|
|
<tr class="separator:ga0a11ce367da8e19eb27cf7f129da4b3d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga145798f7c0cffc0effe3b6588f7a5812"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga145798f7c0cffc0effe3b6588f7a5812"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>DMA_Stream1_IT_MASK</b>   (uint32_t)(DMA_Stream0_IT_MASK << 6)</td></tr>
|
|
<tr class="separator:ga145798f7c0cffc0effe3b6588f7a5812"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gab7e71eaed70613ad592acfb37eb37777"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab7e71eaed70613ad592acfb37eb37777"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>DMA_Stream2_IT_MASK</b>   (uint32_t)(DMA_Stream0_IT_MASK << 16)</td></tr>
|
|
<tr class="separator:gab7e71eaed70613ad592acfb37eb37777"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga83a5c838038ce61242f8beaf8d9fff43"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga83a5c838038ce61242f8beaf8d9fff43"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>DMA_Stream3_IT_MASK</b>   (uint32_t)(DMA_Stream0_IT_MASK << 22)</td></tr>
|
|
<tr class="separator:ga83a5c838038ce61242f8beaf8d9fff43"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga55d28ead27e0af7d17db2b749695abe2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga55d28ead27e0af7d17db2b749695abe2"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>DMA_Stream4_IT_MASK</b>   (uint32_t)(DMA_Stream0_IT_MASK | (uint32_t)0x20000000)</td></tr>
|
|
<tr class="separator:ga55d28ead27e0af7d17db2b749695abe2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaceb30b7dcde1275d843ea932a00f44d7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaceb30b7dcde1275d843ea932a00f44d7"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>DMA_Stream5_IT_MASK</b>   (uint32_t)(DMA_Stream1_IT_MASK | (uint32_t)0x20000000)</td></tr>
|
|
<tr class="separator:gaceb30b7dcde1275d843ea932a00f44d7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga085aa754247e62f4b95111ea4ebf4f6f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga085aa754247e62f4b95111ea4ebf4f6f"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>DMA_Stream6_IT_MASK</b>   (uint32_t)(DMA_Stream2_IT_MASK | (uint32_t)0x20000000)</td></tr>
|
|
<tr class="separator:ga085aa754247e62f4b95111ea4ebf4f6f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga1fe8cb133c442e62bd082adee93a890e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga1fe8cb133c442e62bd082adee93a890e"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>DMA_Stream7_IT_MASK</b>   (uint32_t)(DMA_Stream3_IT_MASK | (uint32_t)0x20000000)</td></tr>
|
|
<tr class="separator:ga1fe8cb133c442e62bd082adee93a890e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga802b72c1de784e703af80a6910592a5e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga802b72c1de784e703af80a6910592a5e"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>TRANSFER_IT_MASK</b>   (uint32_t)0x0F3C0F3C</td></tr>
|
|
<tr class="separator:ga802b72c1de784e703af80a6910592a5e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga375c64407de662589e2b12ac4e5e0489"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga375c64407de662589e2b12ac4e5e0489"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>HIGH_ISR_MASK</b>   (uint32_t)0x20000000</td></tr>
|
|
<tr class="separator:ga375c64407de662589e2b12ac4e5e0489"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga1092a089e682f72660b95df5ee92a167"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga1092a089e682f72660b95df5ee92a167"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>RESERVED_MASK</b>   (uint32_t)0x0F7D0F7D</td></tr>
|
|
<tr class="separator:ga1092a089e682f72660b95df5ee92a167"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:ga38d4a4ab8990299f8a6cf064e1e811d0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group1.html#ga38d4a4ab8990299f8a6cf064e1e811d0">DMA_DeInit</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx)</td></tr>
|
|
<tr class="memdesc:ga38d4a4ab8990299f8a6cf064e1e811d0"><td class="mdescLeft"> </td><td class="mdescRight">Deinitialize the DMAy Streamx registers to their default reset values. <a href="group___d_m_a___group1.html#ga38d4a4ab8990299f8a6cf064e1e811d0">More...</a><br /></td></tr>
|
|
<tr class="separator:ga38d4a4ab8990299f8a6cf064e1e811d0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaced8a4149acfb0a50b50e63273a87148"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group1.html#gaced8a4149acfb0a50b50e63273a87148">DMA_Init</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, <a class="el" href="struct_d_m_a___init_type_def.html">DMA_InitTypeDef</a> *DMA_InitStruct)</td></tr>
|
|
<tr class="memdesc:gaced8a4149acfb0a50b50e63273a87148"><td class="mdescLeft"> </td><td class="mdescRight">Initializes the DMAy Streamx according to the specified parameters in the DMA_InitStruct structure. <a href="group___d_m_a___group1.html#gaced8a4149acfb0a50b50e63273a87148">More...</a><br /></td></tr>
|
|
<tr class="separator:gaced8a4149acfb0a50b50e63273a87148"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga0f7f95f750a90a6824f4e9b6f58adc7e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group1.html#ga0f7f95f750a90a6824f4e9b6f58adc7e">DMA_StructInit</a> (<a class="el" href="struct_d_m_a___init_type_def.html">DMA_InitTypeDef</a> *DMA_InitStruct)</td></tr>
|
|
<tr class="memdesc:ga0f7f95f750a90a6824f4e9b6f58adc7e"><td class="mdescLeft"> </td><td class="mdescRight">Fills each DMA_InitStruct member with its default value. <a href="group___d_m_a___group1.html#ga0f7f95f750a90a6824f4e9b6f58adc7e">More...</a><br /></td></tr>
|
|
<tr class="separator:ga0f7f95f750a90a6824f4e9b6f58adc7e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gab2bea22f9f6dc62fdd7afb385a0c1f73"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group1.html#gab2bea22f9f6dc62fdd7afb385a0c1f73">DMA_Cmd</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, FunctionalState NewState)</td></tr>
|
|
<tr class="memdesc:gab2bea22f9f6dc62fdd7afb385a0c1f73"><td class="mdescLeft"> </td><td class="mdescRight">Enables or disables the specified DMAy Streamx. <a href="group___d_m_a___group1.html#gab2bea22f9f6dc62fdd7afb385a0c1f73">More...</a><br /></td></tr>
|
|
<tr class="separator:gab2bea22f9f6dc62fdd7afb385a0c1f73"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga210a9861460b3c9b3fa14fdc1a949744"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group1.html#ga210a9861460b3c9b3fa14fdc1a949744">DMA_PeriphIncOffsetSizeConfig</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, uint32_t DMA_Pincos)</td></tr>
|
|
<tr class="memdesc:ga210a9861460b3c9b3fa14fdc1a949744"><td class="mdescLeft"> </td><td class="mdescRight">Configures, when the PINC (Peripheral Increment address mode) bit is set, if the peripheral address should be incremented with the data size (configured with PSIZE bits) or by a fixed offset equal to 4 (32-bit aligned addresses). <a href="group___d_m_a___group1.html#ga210a9861460b3c9b3fa14fdc1a949744">More...</a><br /></td></tr>
|
|
<tr class="separator:ga210a9861460b3c9b3fa14fdc1a949744"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga77f7628f6be9d6d088127eceb090b8b2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group1.html#ga77f7628f6be9d6d088127eceb090b8b2">DMA_FlowControllerConfig</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, uint32_t DMA_FlowCtrl)</td></tr>
|
|
<tr class="memdesc:ga77f7628f6be9d6d088127eceb090b8b2"><td class="mdescLeft"> </td><td class="mdescRight">Configures, when the DMAy Streamx is disabled, the flow controller for the next transactions (Peripheral or Memory). <a href="group___d_m_a___group1.html#ga77f7628f6be9d6d088127eceb090b8b2">More...</a><br /></td></tr>
|
|
<tr class="separator:ga77f7628f6be9d6d088127eceb090b8b2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga6a11a2c951cff59b125ba8857d44e3f3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group2.html#ga6a11a2c951cff59b125ba8857d44e3f3">DMA_SetCurrDataCounter</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, uint16_t Counter)</td></tr>
|
|
<tr class="memdesc:ga6a11a2c951cff59b125ba8857d44e3f3"><td class="mdescLeft"> </td><td class="mdescRight">Writes the number of data units to be transferred on the DMAy Streamx. <a href="group___d_m_a___group2.html#ga6a11a2c951cff59b125ba8857d44e3f3">More...</a><br /></td></tr>
|
|
<tr class="separator:ga6a11a2c951cff59b125ba8857d44e3f3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga4a76444a92423f5f15a4328738d6dc46"><td class="memItemLeft" align="right" valign="top">uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group2.html#ga4a76444a92423f5f15a4328738d6dc46">DMA_GetCurrDataCounter</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx)</td></tr>
|
|
<tr class="memdesc:ga4a76444a92423f5f15a4328738d6dc46"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of remaining data units in the current DMAy Streamx transfer. <a href="group___d_m_a___group2.html#ga4a76444a92423f5f15a4328738d6dc46">More...</a><br /></td></tr>
|
|
<tr class="separator:ga4a76444a92423f5f15a4328738d6dc46"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga8d0957e50302efaf48a16c62d14c9ca8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group3.html#ga8d0957e50302efaf48a16c62d14c9ca8">DMA_DoubleBufferModeConfig</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, uint32_t Memory1BaseAddr, uint32_t DMA_CurrentMemory)</td></tr>
|
|
<tr class="memdesc:ga8d0957e50302efaf48a16c62d14c9ca8"><td class="mdescLeft"> </td><td class="mdescRight">Configures, when the DMAy Streamx is disabled, the double buffer mode and the current memory target. <a href="group___d_m_a___group3.html#ga8d0957e50302efaf48a16c62d14c9ca8">More...</a><br /></td></tr>
|
|
<tr class="separator:ga8d0957e50302efaf48a16c62d14c9ca8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga7fe09e62ea3125db384829dab59ebe3e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group3.html#ga7fe09e62ea3125db384829dab59ebe3e">DMA_DoubleBufferModeCmd</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, FunctionalState NewState)</td></tr>
|
|
<tr class="memdesc:ga7fe09e62ea3125db384829dab59ebe3e"><td class="mdescLeft"> </td><td class="mdescRight">Enables or disables the double buffer mode for the selected DMA stream. <a href="group___d_m_a___group3.html#ga7fe09e62ea3125db384829dab59ebe3e">More...</a><br /></td></tr>
|
|
<tr class="separator:ga7fe09e62ea3125db384829dab59ebe3e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga4ebcffd32eb6968ac61cfb64a6bae258"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group3.html#ga4ebcffd32eb6968ac61cfb64a6bae258">DMA_MemoryTargetConfig</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, uint32_t MemoryBaseAddr, uint32_t DMA_MemoryTarget)</td></tr>
|
|
<tr class="memdesc:ga4ebcffd32eb6968ac61cfb64a6bae258"><td class="mdescLeft"> </td><td class="mdescRight">Configures the Memory address for the next buffer transfer in double buffer mode (for dynamic use). This function can be called when the DMA Stream is enabled and when the transfer is ongoing. <a href="group___d_m_a___group3.html#ga4ebcffd32eb6968ac61cfb64a6bae258">More...</a><br /></td></tr>
|
|
<tr class="separator:ga4ebcffd32eb6968ac61cfb64a6bae258"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga74b6624f9faa2f43c9369ddbdeab241c"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group3.html#ga74b6624f9faa2f43c9369ddbdeab241c">DMA_GetCurrentMemoryTarget</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx)</td></tr>
|
|
<tr class="memdesc:ga74b6624f9faa2f43c9369ddbdeab241c"><td class="mdescLeft"> </td><td class="mdescRight">Returns the current memory target used by double buffer transfer. <a href="group___d_m_a___group3.html#ga74b6624f9faa2f43c9369ddbdeab241c">More...</a><br /></td></tr>
|
|
<tr class="separator:ga74b6624f9faa2f43c9369ddbdeab241c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaa4d631cdd6cd020106435f30c0c6fb15"><td class="memItemLeft" align="right" valign="top">FunctionalState </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group4.html#gaa4d631cdd6cd020106435f30c0c6fb15">DMA_GetCmdStatus</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx)</td></tr>
|
|
<tr class="memdesc:gaa4d631cdd6cd020106435f30c0c6fb15"><td class="mdescLeft"> </td><td class="mdescRight">Returns the status of EN bit for the specified DMAy Streamx. <a href="group___d_m_a___group4.html#gaa4d631cdd6cd020106435f30c0c6fb15">More...</a><br /></td></tr>
|
|
<tr class="separator:gaa4d631cdd6cd020106435f30c0c6fb15"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga9893809a7067861ec111f7d712ebf28d"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group4.html#ga9893809a7067861ec111f7d712ebf28d">DMA_GetFIFOStatus</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx)</td></tr>
|
|
<tr class="memdesc:ga9893809a7067861ec111f7d712ebf28d"><td class="mdescLeft"> </td><td class="mdescRight">Returns the current DMAy Streamx FIFO filled level. <a href="group___d_m_a___group4.html#ga9893809a7067861ec111f7d712ebf28d">More...</a><br /></td></tr>
|
|
<tr class="separator:ga9893809a7067861ec111f7d712ebf28d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga10cfc0fe31d64a1fd8fb3efb4ae2a411"><td class="memItemLeft" align="right" valign="top">FlagStatus </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group4.html#ga10cfc0fe31d64a1fd8fb3efb4ae2a411">DMA_GetFlagStatus</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, uint32_t DMA_FLAG)</td></tr>
|
|
<tr class="memdesc:ga10cfc0fe31d64a1fd8fb3efb4ae2a411"><td class="mdescLeft"> </td><td class="mdescRight">Checks whether the specified DMAy Streamx flag is set or not. <a href="group___d_m_a___group4.html#ga10cfc0fe31d64a1fd8fb3efb4ae2a411">More...</a><br /></td></tr>
|
|
<tr class="separator:ga10cfc0fe31d64a1fd8fb3efb4ae2a411"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga510d62b4051f5a5de164e84b266b851d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group4.html#ga510d62b4051f5a5de164e84b266b851d">DMA_ClearFlag</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, uint32_t DMA_FLAG)</td></tr>
|
|
<tr class="memdesc:ga510d62b4051f5a5de164e84b266b851d"><td class="mdescLeft"> </td><td class="mdescRight">Clears the DMAy Streamx's pending flags. <a href="group___d_m_a___group4.html#ga510d62b4051f5a5de164e84b266b851d">More...</a><br /></td></tr>
|
|
<tr class="separator:ga510d62b4051f5a5de164e84b266b851d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gab9c469a3f5d4aca5c97dee798ffc2f05"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group4.html#gab9c469a3f5d4aca5c97dee798ffc2f05">DMA_ITConfig</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, uint32_t DMA_IT, FunctionalState NewState)</td></tr>
|
|
<tr class="memdesc:gab9c469a3f5d4aca5c97dee798ffc2f05"><td class="mdescLeft"> </td><td class="mdescRight">Enables or disables the specified DMAy Streamx interrupts. <a href="group___d_m_a___group4.html#gab9c469a3f5d4aca5c97dee798ffc2f05">More...</a><br /></td></tr>
|
|
<tr class="separator:gab9c469a3f5d4aca5c97dee798ffc2f05"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gad0ccf5f6548bd7cf8f2cae30393bb716"><td class="memItemLeft" align="right" valign="top">ITStatus </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group4.html#gad0ccf5f6548bd7cf8f2cae30393bb716">DMA_GetITStatus</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, uint32_t DMA_IT)</td></tr>
|
|
<tr class="memdesc:gad0ccf5f6548bd7cf8f2cae30393bb716"><td class="mdescLeft"> </td><td class="mdescRight">Checks whether the specified DMAy Streamx interrupt has occurred or not. <a href="group___d_m_a___group4.html#gad0ccf5f6548bd7cf8f2cae30393bb716">More...</a><br /></td></tr>
|
|
<tr class="separator:gad0ccf5f6548bd7cf8f2cae30393bb716"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gad5433018889cd36140d98bb380c4e76e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_m_a___group4.html#gad5433018889cd36140d98bb380c4e76e">DMA_ClearITPendingBit</a> (<a class="el" href="struct_d_m_a___stream___type_def.html">DMA_Stream_TypeDef</a> *DMAy_Streamx, uint32_t DMA_IT)</td></tr>
|
|
<tr class="memdesc:gad5433018889cd36140d98bb380c4e76e"><td class="mdescLeft"> </td><td class="mdescRight">Clears the DMAy Streamx's interrupt pending bits. <a href="group___d_m_a___group4.html#gad5433018889cd36140d98bb380c4e76e">More...</a><br /></td></tr>
|
|
<tr class="separator:gad5433018889cd36140d98bb380c4e76e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>This file provides firmware functions to manage the following functionalities of the Direct Memory Access controller (DMA): </p>
|
|
<dl class="section author"><dt>Author</dt><dd>MCD Application Team </dd></dl>
|
|
<dl class="section version"><dt>Version</dt><dd>V1.4.0 </dd></dl>
|
|
<dl class="section date"><dt>Date</dt><dd>04-August-2014<ul>
|
|
<li>Initialization and Configuration</li>
|
|
<li>Data Counter</li>
|
|
<li>Double Buffer mode configuration and command</li>
|
|
<li>Interrupts and flags management</li>
|
|
</ul>
|
|
</dd></dl>
|
|
<pre class="fragment">===============================================================================
|
|
##### How to use this driver #####
|
|
===============================================================================
|
|
[..]
|
|
(#) Enable The DMA controller clock using RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_DMA1, ENABLE)
|
|
function for DMA1 or using RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_DMA2, ENABLE)
|
|
function for DMA2.
|
|
|
|
(#) Enable and configure the peripheral to be connected to the DMA Stream
|
|
(except for internal SRAM / FLASH memories: no initialization is
|
|
necessary).
|
|
|
|
(#) For a given Stream, program the required configuration through following parameters:
|
|
Source and Destination addresses, Transfer Direction, Transfer size, Source and Destination
|
|
data formats, Circular or Normal mode, Stream Priority level, Source and Destination
|
|
Incrementation mode, FIFO mode and its Threshold (if needed), Burst
|
|
mode for Source and/or Destination (if needed) using the DMA_Init() function.
|
|
To avoid filling unneccessary fields, you can call DMA_StructInit() function
|
|
to initialize a given structure with default values (reset values), the modify
|
|
only necessary fields
|
|
(ie. Source and Destination addresses, Transfer size and Data Formats).
|
|
|
|
(#) Enable the NVIC and the corresponding interrupt(s) using the function
|
|
DMA_ITConfig() if you need to use DMA interrupts.
|
|
|
|
(#) Optionally, if the Circular mode is enabled, you can use the Double buffer mode by configuring
|
|
the second Memory address and the first Memory to be used through the function
|
|
DMA_DoubleBufferModeConfig(). Then enable the Double buffer mode through the function
|
|
DMA_DoubleBufferModeCmd(). These operations must be done before step 6.
|
|
|
|
(#) Enable the DMA stream using the DMA_Cmd() function.
|
|
|
|
(#) Activate the needed Stream Request using PPP_DMACmd() function for
|
|
any PPP peripheral except internal SRAM and FLASH (ie. SPI, USART ...)
|
|
The function allowing this operation is provided in each PPP peripheral
|
|
driver (ie. SPI_DMACmd for SPI peripheral).
|
|
Once the Stream is enabled, it is not possible to modify its configuration
|
|
unless the stream is stopped and disabled.
|
|
After enabling the Stream, it is advised to monitor the EN bit status using
|
|
the function DMA_GetCmdStatus(). In case of configuration errors or bus errors
|
|
this bit will remain reset and all transfers on this Stream will remain on hold.
|
|
|
|
(#) Optionally, you can configure the number of data to be transferred
|
|
when the Stream is disabled (ie. after each Transfer Complete event
|
|
or when a Transfer Error occurs) using the function DMA_SetCurrDataCounter().
|
|
And you can get the number of remaining data to be transferred using
|
|
the function DMA_GetCurrDataCounter() at run time (when the DMA Stream is
|
|
enabled and running).
|
|
|
|
(#) To control DMA events you can use one of the following two methods:
|
|
(##) Check on DMA Stream flags using the function DMA_GetFlagStatus().
|
|
(##) Use DMA interrupts through the function DMA_ITConfig() at initialization
|
|
phase and DMA_GetITStatus() function into interrupt routines in
|
|
communication phase.
|
|
[..]
|
|
After checking on a flag you should clear it using DMA_ClearFlag()
|
|
function. And after checking on an interrupt event you should
|
|
clear it using DMA_ClearITPendingBit() function.
|
|
|
|
(#) Optionally, if Circular mode and Double Buffer mode are enabled, you can modify
|
|
the Memory Addresses using the function DMA_MemoryTargetConfig(). Make sure that
|
|
the Memory Address to be modified is not the one currently in use by DMA Stream.
|
|
This condition can be monitored using the function DMA_GetCurrentMemoryTarget().
|
|
|
|
(#) Optionally, Pause-Resume operations may be performed:
|
|
The DMA_Cmd() function may be used to perform Pause-Resume operation.
|
|
When a transfer is ongoing, calling this function to disable the
|
|
Stream will cause the transfer to be paused. All configuration registers
|
|
and the number of remaining data will be preserved. When calling again
|
|
this function to re-enable the Stream, the transfer will be resumed from
|
|
the point where it was paused.
|
|
|
|
-@- Memory-to-Memory transfer is possible by setting the address of the memory into
|
|
the Peripheral registers. In this mode, Circular mode and Double Buffer mode
|
|
are not allowed.
|
|
|
|
-@- The FIFO is used mainly to reduce bus usage and to allow data
|
|
packing/unpacking: it is possible to set different Data Sizes for
|
|
the Peripheral and the Memory (ie. you can set Half-Word data size
|
|
for the peripheral to access its data register and set Word data size
|
|
for the Memory to gain in access time. Each two Half-words will be
|
|
packed and written in a single access to a Word in the Memory).
|
|
|
|
-@- When FIFO is disabled, it is not allowed to configure different
|
|
Data Sizes for Source and Destination. In this case the Peripheral
|
|
Data Size will be applied to both Source and Destination. </pre><dl class="section attention"><dt>Attention</dt><dd></dd></dl>
|
|
<h2><center>© COPYRIGHT 2014 STMicroelectronics</center></h2>
|
|
<p>Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at: </p><pre class="fragment"> http://www.st.com/software_license_agreement_liberty_v2
|
|
</pre><p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </p>
|
|
</div></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Sun May 10 2015 15:15:18 for discoverpixy by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.9.1
|
|
</small></address>
|
|
</body>
|
|
</html>
|