文档详情

STM32外扩RAM做变量定义与内部RAM做堆栈的设置.pdf

发布:2017-05-31约2.05万字共12页下载文档
文本预览下载声明
STM32 外扩RAM 做变量定义与内部RAM 做堆栈的设置 说明:当STM32 上运行UC/OSII 和UC/GUI 时,STM32 内部自带的RAM 可能不够用,这 就需要STM32 的外扩RAM 功能,内部RAM 作为中断服务程序的堆栈使用,而外部RAM 作为存放临时变量的地方和UC/OSII 的任务切换用堆栈,具体配置如下: 1. 修改启动代码 我使用的开发板外扩了512K 字节的RAM ,分配的地址为BANK1 的第3 个区,即起始地 址为0大小为0x80000 启动代码如下: ;******************** (C) COPYRIGHT 2009 STMicroelectronics ******************** ;* File Name : startup_stm32f10x_hd.s ;* Author : MCD Application Team ;* Version : V3.1.0 ;* Date : 06/19/2009 ;* Description : STM32F10x High Density Devices vector table for RVMDK ;* toolchain. ;* This module performs: ;* - Set the initial SP ;* - Set the initial PC == Reset_Handler ;* - Set the vector table entries with the exceptions ISR address ;* - Configure external SRAM mounted on STM3210E-EVAL board ;* to be used as data memory (optional, to be enabled by user) ;* - Branches to __main in the C library (which eventually ;* calls main()). ;* After Reset the CortexM3 processor is in Thread mode, ;* priority is Privileged, and the Stack is set to Main. ;* Use Configuration Wizard in Context Menu ;****************************************************************************** * ; 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 CO
显示全部
相似文档