转。。
在<<STM32不完全手册里面>>,用的是STM32F103RBT6,,里面定义了STM32的堆栈大小以及各种中断的名字及入口函数名称,还有启动相关的汇编代码。,从其里面的内容看来,它只定义了3个串口,4个定时器。实际上STM32的系列产品有5个串口的型号,也只有有2个串口的型号,定时器也是,做多的有8个定时器。比如,如果你用的STM32F103ZET6,,你可以正常使用串口1~3的中断,而串口4和5的中断,则无**常使用。又比如,你TIM1~4的中断可以正常使用,而5~8的,则无法使用。
而在固件库里出现3个文件
其中,;;hd适用于大容量产品;
:
小容量:FLASH≤32K
中容量:64K≤FLASH≤128K
大容量:256K≤FLASH
;******************** (C) COPYRIGHT 2011 STMicroelectronics ********************
;* File Name :
;* Author : MCD Application Team
;* Version :
;* Date : 11-March-2011
;* Description : STM32F10x High Density Devices vector table for MDK-ARM
;* 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 the clock system and also configure the 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.
;* 说明: 此文件为STM32F10x高密度设备的MDK工具链的启动文件
;* 该模块执行以下操作:
;* -设置初始堆栈指针(SP)
;* -设置初始程序计数器(PC)为复位向量,并在执行main函数前初始化系统时钟
;* -设置向量表入口为异常事件的入口地址
;* -复位之后处理器为线程模式,优先级为特权级,堆栈设置为MSP主堆栈
;* <<< Use Configuration Wizard in Context Menu >>>
STM32F103启动文件详解 来自淘豆网m.daumloan.com转载请标明出处.