DMA

所属分类:单片机开发
开发工具:Visual C++
文件大小:36KB
下载次数:47
上传日期:2010-10-15 09:26:27
上 传 者zuan94007
说明:  stm32 dma资料+程序,适合新手学习使用
(stm32 dma data+ program, suitable for beginners learning to use)

文件列表:
DMA\Example1\main.c (8641, 2007-10-08)
DMA\Example1\stm32f10x_conf.h (5584, 2007-10-08)
DMA\Example1\stm32f10x_it.c (23100, 2007-10-08)
DMA\Example1\stm32f10x_it.h (3267, 2007-10-08)
DMA\Example2\main.c (11638, 2008-01-24)
DMA\Example2\stm32f10x_conf.h (5570, 2007-10-08)
DMA\Example2\stm32f10x_it.c (22693, 2007-10-08)
DMA\Example2\stm32f10x_it.h (3267, 2007-10-08)
DMA\Example3\main.c (13381, 2008-01-28)
DMA\Example3\stm32f10x_conf.h (5564, 2007-10-08)
DMA\Example3\stm32f10x_it.c (22693, 2007-10-08)
DMA\Example3\stm32f10x_it.h (3267, 2007-10-08)
DMA\Example4\main.c (9666, 2008-01-28)
DMA\Example4\stm32f10x_conf.h (5570, 2007-10-08)
DMA\Example4\stm32f10x_it.c (22693, 2007-10-08)
DMA\Example4\stm32f10x_it.h (3267, 2007-10-08)
DMA\Example1 (0, 2010-09-16)
DMA\Example2 (0, 2010-09-16)
DMA\Example3 (0, 2010-09-16)
DMA\Example4 (0, 2010-09-16)
DMA (0, 2010-09-16)

/******************** (C) COPYRIGHT 2007 STMicroelectronics ******************** * File Name : readme.txt * Author : MCD Application Team * Version : V1.0 * Date : 10/08/2007 * Description : Description of the DMA Example1. ******************************************************************************** * THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE * CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. *******************************************************************************/ 本例展示了如何使用DMA把数据从FLASH传送到RAM。 运行程序,本例使用DMA通道6(DMA Channel6)作为传输管道。把一块大小为32个字(32-word)缓存,从FLASH中转移到位于RAM的目标区去。传输由软件触发。在程序中激活DMA通道6的memory-to-memory功能。一旦传输完成,DMA将产生一个中断。中断程序将读取DMA中待传输数据的数目(等于0)并清除中断旗位。同时程序将比较源数据和目标数据,检查传输是否正确。 Example description =================== This example provides a description of how to use a DMA channel to transfer a word data buffer from memory (Flash) to memory (RAM). DMA Channel6 is configured to transfer the contents of a 32-word data buffer stored in Flash memory to the reception buffer declared in RAM. Trigger is done by software. DMA Channel6 memory-to-memory transfer is enabled. Source and destination address incrementing is also enabled. The transfer is started by setting the Channel enable bit for DMA Channel6. At the end of the transfer a Transfer Complete interrupt is generated if enabled. In the routine, the remaining data to be transferred is read, it must be equal to 0. The Transfer Complete Interrupt pending bit is then cleared. A comparison between the source buffer and the destination buffer is done to check that all data have been correctly transferred. Directory contents ================== stm32f10x_conf.h Library Configuration file stm32f10x_it.c Interrupt handlers stm32f10x_it.h Interrupt handlers header file main.c Main program Hardware environment ==================== No hardware connection needed. How to use it ============= In order to make the program work, you must do the following : - Create a project and setup all your toolchain's start-up files - Compile the directory content files and required Library files : + stm32f10x_lib.c + stm32f10x_dma.c + stm32f10x_rcc.c + stm32f10x_nvic.c + stm32f10x_flash.c - Link all compiled files and load your image into either RAM or FLASH - Run the example ******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE******

近期下载者

相关文件


收藏者