STM32F407_DMA_FLASH_RAM

所属分类:其他嵌入式/单片机内容
开发工具:C/C++
文件大小:41KB
下载次数:25
上传日期:2012-08-12 00:12:41
上 传 者MOXUQIN
说明:  STM32F407 实现鼠标功能程序,固件包程序例程,有完整的c语言源代码
(The STM32F407 mouse function program routine, the firmware package, a complete C language source code)

文件列表:
DMA_FLASH_RAM\EWARM\DMA_FLASH_RAM.ewd (24221, 2011-10-28)
DMA_FLASH_RAM\EWARM\DMA_FLASH_RAM.ewp (26098, 2011-10-28)
DMA_FLASH_RAM\EWARM\DMA_FLASH_RAM.eww (167, 2011-10-28)
DMA_FLASH_RAM\EWARM\stm32f4xx_flash.icf (1342, 2011-10-28)
DMA_FLASH_RAM\main.c (8997, 2011-10-28)
DMA_FLASH_RAM\main.h (2293, 2011-10-28)
DMA_FLASH_RAM\MDK-ARM\DMA_FLASH_RAM.uvopt (13852, 2011-10-28)
DMA_FLASH_RAM\MDK-ARM\DMA_FLASH_RAM.uvproj (18041, 2011-10-28)
DMA_FLASH_RAM\stm32f4xx_conf.h (3812, 2011-10-28)
DMA_FLASH_RAM\stm32f4xx_it.c (4911, 2011-10-28)
DMA_FLASH_RAM\stm32f4xx_it.h (2097, 2011-10-28)
DMA_FLASH_RAM\system_stm32f4xx.c (21172, 2011-10-28)
DMA_FLASH_RAM\TASKING\DMA_FLASH_RAM\.cproject (37497, 2011-10-28)
DMA_FLASH_RAM\TASKING\DMA_FLASH_RAM\.project (3095, 2011-10-28)
DMA_FLASH_RAM\TASKING\DMA_FLASH_RAM\DMA_FLASH_RAM.launch (4144, 2011-10-28)
DMA_FLASH_RAM\TASKING\DMA_FLASH_RAM\TASKING\stm32f4xx.lsl (15846, 2011-10-28)
DMA_FLASH_RAM\TrueSTUDIO\DMA_FLASH_RAM\.cproject (20763, 2011-10-28)
DMA_FLASH_RAM\TrueSTUDIO\DMA_FLASH_RAM\.project (4766, 2011-10-28)
DMA_FLASH_RAM\TrueSTUDIO\DMA_FLASH_RAM\.settings\com.atollic.truestudio.debug.hardware_device.prefs (222, 2011-10-28)
DMA_FLASH_RAM\TrueSTUDIO\DMA_FLASH_RAM\DMA_FLASH_RAM.elf.launch (4777, 2011-10-28)
DMA_FLASH_RAM\TrueSTUDIO\DMA_FLASH_RAM\stm32_flash.ld (4978, 2011-10-28)
DMA_FLASH_RAM\TASKING\.metadata\Link (0, 2011-10-28)
DMA_FLASH_RAM\TASKING\DMA_FLASH_RAM\TASKING (0, 2012-07-14)
DMA_FLASH_RAM\TrueSTUDIO\.metadata\Link (0, 2011-10-28)
DMA_FLASH_RAM\TrueSTUDIO\DMA_FLASH_RAM\.settings (0, 2012-07-14)
DMA_FLASH_RAM\TASKING\.metadata (0, 2012-07-14)
DMA_FLASH_RAM\TASKING\DMA_FLASH_RAM (0, 2012-07-14)
DMA_FLASH_RAM\TrueSTUDIO\.metadata (0, 2012-07-14)
DMA_FLASH_RAM\TrueSTUDIO\DMA_FLASH_RAM (0, 2012-07-14)
DMA_FLASH_RAM\EWARM (0, 2012-07-14)
DMA_FLASH_RAM\MDK-ARM (0, 2012-07-14)
DMA_FLASH_RAM\TASKING (0, 2012-07-14)
DMA_FLASH_RAM\TrueSTUDIO (0, 2012-07-14)
DMA_FLASH_RAM (0, 2012-07-14)

/** @page DMA_FLASH_RAM DMA_FLASH_RAM @verbatim ******************** (C) COPYRIGHT 2011 STMicroelectronics ******************* * @file DMA_FLASH_RAM/readme.txt * @author MCD Application Team * @version V1.0.0 * @date 19-September-2011 * @brief Description of the DMA FLASH to RAM example. ****************************************************************************** * THE PRESENT FIRMWARE 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 FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. ****************************************************************************** @endverbatim @par Example Description This example provides a description of how to use a DMA channel to transfer a word data buffer from FLASH memory to embedded SRAM memory. DMA2 Stream0 channel0 is configured to transfer the contents of a 32-word data buffer stored in Flash memory to the reception buffer declared in RAM. The start of transfer is triggered by software. DMA2 Stream0 channel0 memory-to-memory transfer is enabled. Source and destination addresses incrementing is also enabled. The transfer is started by setting the Channel enable bit for DMA2 Stream0 channel0. At the end of the transfer a Transfer Complete interrupt is generated since it is enabled. The Transfer Complete Interrupt pending bit is then cleared. When the DMA transfer is completed the DMA Stream is disabled by hardware. The main application can check on the Stream Enable status to detect the end of transfer or can also check on the number of remaining transfers which should be equal to 0 at the end of the transfer. A comparison between the source and destination buffers is done to check that all data have been correctly transferred. STM32 Eval board's LEDs can be used to monitor the transfer status: - LED4 is ON when the program starts. - LED3 is ON when the configuration phase is done and the transfer is started. - LED5 is ON when the transfer is complete (into the Transfer Complete interrupt routine) - LED6 is ON when the comparison result between source buffer and destination buffer is passed. It is possible to select a different Stream and/or channel for the DMA transfer example by modifying defines values in the file main.h. Note that only DMA2 Streams are able to perform Memory-to-Memory transfers. There are different options to check on the DMA end of transfer: 1. Use DMA Transfer Complete interrupt. 2. Use DMA enable state (the DMA stream is disabled by hardware when transfer is complete). 3. Use DMA Stream transfer counter value (the counter value is decremented when transfer is ongoing and is equal to 0 at the transfer end). 4. Use DMA Transfer Complete flag (polling mode). In this example methods 1, 2 and 3 are provided (you can select between method 2 and 3 by uncommenting relative code in waiting loop in the main.c file). @par Directory contents - DMA_FLASH_RAM/system_stm32f40x.c STM32F4xx system clock configuration file - DMA_FLASH_RAM/stm32f4xx_conf.h Library Configuration file - DMA_FLASH_RAM/stm32f4xx_it.c Interrupt handlers - DMA_FLASH_RAM/stm32f4xx_it.h Interrupt handlers header file - DMA_FLASH_RAM/main.c Main program - DMA_FLASH_RAM/main.h Main program header file @par Hardware and Software environment - This example runs on STM32F4xx Devices Revision A. - This example has been tested with STM32F4-Discovery (MB997) RevA and can be easily tailored to any other development board. @par How to use it ? In order to make the program work, you must do the following : + EWARM - Open the DMA_FLASH_RAM.eww workspace - Rebuild all files: Project->Rebuild all - Load project image: Project->Debug - Run program: Debug->Go(F5) + MDK-ARM - Open the DMA_FLASH_RAM.uvproj project - Rebuild all files: Project->Rebuild all target files - Load project image: Debug->Start/Stop Debug Session - Run program: Debug->Run (F5) + TASKING - Open TASKING toolchain. - Click on File->Import, select General->'Existing Projects into Workspace' and then click "Next". - Browse to TASKING workspace directory and select the project "DMA_FLASH_RAM" - Rebuild all project files: Select the project in the "Project explorer" window then click on Project->build project menu. - Run program: Select the project in the "Project explorer" window then click Run->Debug (F11) + TrueSTUDIO - Open the TrueSTUDIO toolchain. - Click on File->Switch Workspace->Other and browse to TrueSTUDIO workspace directory. - Click on File->Import, select General->'Existing Projects into Workspace' and then click "Next". - Browse to the TrueSTUDIO workspace directory and select the project "DMA_FLASH_RAM" - Rebuild all project files: Select the project in the "Project explorer" window then click on Project->build project menu. - Run program: Select the project in the "Project explorer" window then click Run->Debug (F11) *

© COPYRIGHT 2011 STMicroelectronics

*/

近期下载者

相关文件


收藏者