DMA

所属分类:单片机开发
开发工具:C/C++
文件大小:496KB
下载次数:21
上传日期:2008-03-17 23:52:26
上 传 者kz02bcxg
说明:  This example provides a description of how to use a DMA channel to transfer a word data buffer from memory (Flash) to memory (RAM). The dedicated DMA channel is configured to transfer once a time a 32 word data buffer stored as constant in the Flash memory to another buffer in the RAM memory. The received data are stored in the DST_Buffer. The DMA channel transfer complete interrupt is enabled to generate an interrupt at the end of the buffer transfer. As soon as the transfer is completed an interrupt is generated and in the DMA channel interrupt routine the transfer complete interrupt pending bit is cleared. The data counter is stored before and after the transfer to show that all data has been transfered. TransferStatus gives the data transfer status where it is PASSED if transmitted and received data are the same otherwise it is FAILED
(This example provides a description of how to use a DMA channel to transfer a word data buffer from memory (Flash) to memory (RAM). The dedicated DMA channel is configured to transfer once a time a 32 word data bufferstored as constant in the Flash memory to another buffer in the RAM memory.The received data are stored in the DST_Buffer.The DMA channel transfer complete interrupt is enabled to generate an interrupt atthe end of the buffer transfer. As soon as the transfer is completed an interrupt isgenerated and in the DMA channel interrupt routine the transfer complete interrupt pending bit is cleared. The data counter is stored before and after the transfer to show that all data has beentransfered.TransferStatus gives the data transfer status where it is PASSED if transmitted and received data are the same otherwise it is FAILED)

文件列表:
DMA\listing\DMA.map (77641, 2007-10-08)
DMA\listing\cortexm3_macro.lst (24892, 2007-10-08)
DMA\listing\stm32f10x_vector.lst (30893, 2007-10-08)
DMA\obj\DMA.axf (150584, 2007-10-08)
DMA\obj\DMA.htm (76063, 2007-10-08)
DMA\obj\DMA.lnp (537, 2007-10-08)
DMA\obj\DMA.plg (212, 2007-11-20)
DMA\obj\DMA.sct (479, 2007-10-08)
DMA\obj\DMA.tra (1779, 2007-10-08)
DMA\obj\cortexm3_macro.o (2352, 2007-10-08)
DMA\obj\main.crf (128928, 2007-10-08)
DMA\obj\main.d (1549, 2007-10-08)
DMA\obj\main.o (134364, 2007-10-08)
DMA\obj\stm32f10x_dma.crf (33480, 2007-10-08)
DMA\obj\stm32f10x_dma.d (482, 2007-10-08)
DMA\obj\stm32f10x_dma.o (41068, 2007-10-08)
DMA\obj\stm32f10x_flash.crf (30027, 2007-10-08)
DMA\obj\stm32f10x_flash.d (428, 2007-10-08)
DMA\obj\stm32f10x_flash.o (38100, 2007-10-08)
DMA\obj\stm32f10x_gpio.crf (35017, 2007-10-08)
DMA\obj\stm32f10x_gpio.d (491, 2007-10-08)
DMA\obj\stm32f10x_gpio.o (43500, 2007-10-08)
DMA\obj\stm32f10x_it.crf (125538, 2007-10-08)
DMA\obj\stm32f10x_it.d (1751, 2007-10-08)
DMA\obj\stm32f10x_it.o (138832, 2007-10-08)
DMA\obj\stm32f10x_lib.crf (123182, 2007-10-08)
DMA\obj\stm32f10x_lib.d (1756, 2007-10-08)
DMA\obj\stm32f10x_lib.o (126920, 2007-10-08)
DMA\obj\stm32f10x_nvic.crf (29560, 2007-10-08)
DMA\obj\stm32f10x_nvic.d (420, 2007-10-08)
DMA\obj\stm32f10x_nvic.o (40976, 2007-10-08)
DMA\obj\stm32f10x_rcc.crf (34157, 2007-10-08)
DMA\obj\stm32f10x_rcc.d (412, 2007-10-08)
DMA\obj\stm32f10x_rcc.o (42540, 2007-10-08)
DMA\obj\stm32f10x_usart.crf (37646, 2007-10-08)
DMA\obj\stm32f10x_usart.d (500, 2007-10-08)
DMA\obj\stm32f10x_usart.o (46404, 2007-10-08)
DMA\obj\stm32f10x_vector.o (4900, 2007-10-08)
DMA\obj\usart1.crf (128406, 2007-10-08)
DMA\obj\usart1.d (1603, 2007-10-08)
... ...

/******************** (C) COPYRIGHT 2007 STMicroelectronics ******************** * File Name : readme.txt * Author : MCD Application Team * Date First Issued : 02/05/2007 * Description : Description of the DMA Example1. ******************************************************************************** * History: * 05/21/2007: V0.3 * 04/02/2007: V0.2 * 02/05/2007: V0.1 ******************************************************************************** * 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. *******************************************************************************/ 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). The dedicated DMA channel is configured to transfer once a time a 32 word data buffer stored as constant in the Flash memory to another buffer in the RAM memory. The received data are stored in the DST_Buffer. The DMA channel transfer complete interrupt is enabled to generate an interrupt at the end of the buffer transfer. As soon as the transfer is completed an interrupt is generated and in the DMA channel interrupt routine the transfer complete interrupt pending bit is cleared. The data counter is stored before and after the transfer to show that all data has been transfered. TransferStatus gives the data transfer status where it is PASSED if transmitted and received data are the same otherwise it is FAILED 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 needed hardware 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******

近期下载者

相关文件


收藏者