FLASH

所属分类:处理器开发
开发工具:C/C++
文件大小:137KB
下载次数:18
上传日期:2016-05-10 10:00:09
上 传 者zqbit
说明:  CubeMx STM32 Flash 操作程序
(CubeMx STM32 Flash Program)

文件列表:
FLASH\FLASH_EraseProgram\EWARM\Project.ewd (36889, 2014-11-27)
FLASH\FLASH_EraseProgram\EWARM\Project.ewp (28183, 2014-11-27)
FLASH\FLASH_EraseProgram\EWARM\Project.eww (161, 2014-11-27)
FLASH\FLASH_EraseProgram\EWARM\startup_stm32f103xb.s (14448, 2015-07-28)
FLASH\FLASH_EraseProgram\EWARM\stm32f103xb_flash.icf (1355, 2014-11-27)
FLASH\FLASH_EraseProgram\Inc\main.h (14122, 2015-07-28)
FLASH\FLASH_EraseProgram\Inc\stm32f1xx_hal_conf.h (14662, 2015-07-28)
FLASH\FLASH_EraseProgram\Inc\stm32f1xx_it.h (3139, 2015-07-28)
FLASH\FLASH_EraseProgram\MDK-ARM\Project.uvguix.PC-fengziqi (139808, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\Project.uvopt (14603, 2014-11-27)
FLASH\FLASH_EraseProgram\MDK-ARM\Project.uvoptx (13093, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\Project.uvproj.saved_uv4 (18470, 2014-11-27)
FLASH\FLASH_EraseProgram\MDK-ARM\Project.uvprojx (19388, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\RTE\RTE_Components.h (265, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\startup_stm32f103xb.lst (41010, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\startup_stm32f103xb.s (13791, 2015-07-28)
FLASH\FLASH_EraseProgram\MDK-ARM\STM32F103RB_Nucleo\main.d (84, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\STM32F103RB_Nucleo\Project_STM32F103RB_Nucleo.dep (8897, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\STM32F103RB_Nucleo\startup_stm32f103xb.d (65, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\STM32F103RB_Nucleo\startup_stm32f103xb.o (5840, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\STM32F103RB_Nucleo\STM32F103RB_Nucleo.build_log.htm (4735, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\STM32F103RB_Nucleo\STM32F103RB_Nucleo.sct (479, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\STM32F103RB_Nucleo\stm32f1xx_hal.d (0, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\STM32F103RB_Nucleo\stm32f1xx_hal_cortex.d (0, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\STM32F103RB_Nucleo\stm32f1xx_hal_flash.d (0, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\STM32F103RB_Nucleo\stm32f1xx_hal_flash_ex.d (0, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\STM32F103RB_Nucleo\stm32f1xx_hal_gpio.d (0, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\STM32F103RB_Nucleo\stm32f1xx_hal_rcc.d (0, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\STM32F103RB_Nucleo\stm32f1xx_hal_rcc_ex.d (0, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\STM32F103RB_Nucleo\stm32f1xx_it.d (108, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\STM32F103RB_Nucleo\stm32f1xx_nucleo.d (0, 2016-05-04)
FLASH\FLASH_EraseProgram\MDK-ARM\STM32F103RB_Nucleo\system_stm32f1xx.d (66, 2016-05-04)
FLASH\FLASH_EraseProgram\Src\main.c (9782, 2015-07-28)
FLASH\FLASH_EraseProgram\Src\stm32f1xx_it.c (5581, 2015-07-28)
FLASH\FLASH_EraseProgram\Src\system_stm32f1xx.c (16061, 2015-07-28)
FLASH\FLASH_EraseProgram\SW4STM32\startup_stm32f103xb.s (11535, 2015-07-28)
FLASH\FLASH_EraseProgram\SW4STM32\STM32F103RB_Nucleo\.cproject (11709, 2015-06-01)
FLASH\FLASH_EraseProgram\SW4STM32\STM32F103RB_Nucleo\.project (3288, 2015-06-01)
FLASH\FLASH_EraseProgram\SW4STM32\STM32F103RB_Nucleo\STM32F103RBTx_FLASH.ld (4422, 2015-06-01)
... ...

/** @page FLASH_EraseProgram FLASH Erase and Program example @verbatim ******************** (C) COPYRIGHT 2015 STMicroelectronics ******************* * @file FLASH/FLASH_EraseProgram/readme.txt * @author MCD Application Team * @version V1.2.0 * @date 31-July-2015 * @brief Description of the FLASH Erase and Program example. ****************************************************************************** * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. Neither the name of STMicroelectronics nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************** @endverbatim @par Example Description This example describes how to configure and use the FLASH HAL API to erase and program the internal FLASH memory. At the beginning of the main program the HAL_Init() function is called to reset all the peripherals, initialize the Flash interface and the systick. Then the SystemClock_Config() function is used to configure the system clock (SYSCLK) to run at *** MHz. After Reset, the Flash memory Program/Erase Controller is locked. A dedicated function is used to enable the FLASH control register access. Before programming the desired addresses, an erase operation is performed using the flash erase page feature. The erase procedure is done by filling the erase init structure giving the starting erase page and the number of pages to erase. At this stage, all these pages will be erased one by one separately. @note: if problem occurs on a page, erase will be stopped and faulty page will be returned to user (through variable 'pageError'). Once this operation is finished, page word programming operation will be performed in the FLASH memory. The written data is then read back and checked. The STM32F103RB-Nucleo board LEDs can be used to monitor the transfer status: - LED2 is ON when there are no errors detected after programmation - LED2 is blinking with a 1s period when there are errors dectected after programmation - LED2 is blinking (100ms on, 2s off) when there is an issue during erase or program procedure @note Care must be taken when using HAL_Delay(), this function provides accurate delay (in milliseconds) based on variable incremented in SysTick ISR. This implies that if HAL_Delay() is called from a peripheral ISR process, then the SysTick interrupt must have higher priority (numerically lower) than the peripheral interrupt. Otherwise the caller ISR process will be blocked. To change the SysTick interrupt priority you have to use HAL_NVIC_SetPriority() function. @note The application need to ensure that the SysTick time base is always set to 1 millisecond to have correct HAL operation. @par Directory contents - FLASH/FLASH_EraseProgram/Inc/stm32f1xx_hal_conf.h HAL Configuration file - FLASH/FLASH_EraseProgram/Inc/stm32f1xx_it.h Header for stm32f1xx_it.c - FLASH/FLASH_EraseProgram/Inc/main.h Header for main.c module - FLASH/FLASH_EraseProgram/Src/stm32f1xx_it.c Interrupt handlers - FLASH/FLASH_EraseProgram/Src/main.c Main program - FLASH/FLASH_EraseProgram/Src/system_stm32f1xx.c STM32F1xx system clock configuration file @par Hardware and Software environment - This example runs on STM32F103xB devices. - This example has been tested with STM32F103RB-Nucleo board and can be easily tailored to any other supported device and development board. @par How to use it ? In order to make the program work, you must do the following: - Open your preferred toolchain - Rebuild all files and load your image into target memory - Run the example *

© COPYRIGHT STMicroelectronics

*/

近期下载者

相关文件


收藏者