About STM32F10x.s startup file

Publisher:mu22Latest update time:2016-01-11 Source: eefocusKeywords:STM32F10x.s Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
In the <>, all our routines use a startup file called STM32F10x.s, which defines the stack size of STM32, the names of various interrupts and the names of entry functions, as well as startup-related assembly code. STM32F10x.s is the startup code provided by MDK. From its content, it only defines 3 serial ports and 4 timers. In fact, the STM32 series products have models with 5 serial ports, and only models with 2 serial ports. The same is true for timers, with a maximum of 8 timers. For example, if you use STM32F103ZET6, and the startup file uses STM32F10x.s, you can use the interrupts of serial ports 1~3 normally, but the interrupts of serial ports 4 and 5 cannot be used normally. For another example, your interrupts of TIM1~4 can be used normally, but those of 5~8 cannot be used.
       Therefore, STM32F10x.s cannot be applied to all STM32 models. In this way, we have to choose different startup files for different STM32 models. ST provides us with 3 startup files, which are suitable for STM32 chips of different capacities. They are: 
startup_stm32f10x_ld.s
startup_stm32f10x_md.s
startup_stm32f10x_hd.s
Among them, ld.s is suitable for small-capacity products; md.s is suitable for medium-capacity products; hd is suitable for large-capacity products; the capacity here refers to the size of FLASH. The judgment method is as follows:
Small capacity: FLASH≤32K
Medium capacity: 64K≤FLASH≤128K
Large capacity: 256K≤FLASH
        Our development board uses STM32F103RBT6, with a FLASH capacity of 128K, which is a medium-capacity product, and STM32F10x.s just meets the startup file for medium-capacity models, so there will be no problem using STM32F10x.s, it is equivalent to startup_stm32f10x_md.s. If you have a small-capacity or large-capacity STM32, you can choose startup_stm32f10x_ld.s or startup_stm32f10x_hd.s accordingly.
Keywords:STM32F10x.s Reference address:About STM32F10x.s startup file

Previous article:STM32-USMART Study Notes
Next article:Port multiplexing and remapping

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号