资源预览内容
第1页 / 共155页
第2页 / 共155页
第3页 / 共155页
第4页 / 共155页
第5页 / 共155页
第6页 / 共155页
第7页 / 共155页
第8页 / 共155页
第9页 / 共155页
第10页 / 共155页
亲,该文档总共155页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
March 2011Doc ID 15491 Rev 41/155PM0056 Programming manual STM32F10xxx/20xxx/21xxx/L1xxxx Cortex-M3 programming manualThis programming manual provides information for application and system-level software developers. It gives a full description of the STM32F10xxx/20xxx/21xxx/L1xxxx Cortex- M3 processor programming model, instruction set and core peripherals. The STM32F10xxx/20xxx/21xxx/L1xxxx Cortex-M3 processor is a high performance 32-bit processor designed for the microcontroller market. It offers significant benefits to developers, including:Outstanding processing performance combined with fast interrupt handlingEnhanced system debug with extensive breakpoint and trace capabilitiesEfficient processor core, system and memoriesUltra-low power consumption with integrated sleep modesPlatform securitywww.st.comContentsPM00562/155 Doc ID 15491 Rev 4Contents1About this document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.1Typographical conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.2List of abbreviations for registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.3About the STM32 Cortex-M3 processor and core peripherals . . . . . . . . . 101.3.1System level interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111.3.2Integrated configurable debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111.3.3Cortex-M3 processor features and benefits summary . . . . . . . . . . . . . . 121.3.4Cortex-M3 core peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132The Cortex-M3 processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.1Programmers model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.1.1Processor mode and privilege levels for software execution . . . . . . . . . 142.1.2Stacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.1.3Core registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.1.4Exceptions and interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.1.5Data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.1.6The Cortex microcontroller software interface standard (CMSIS) . . . . . 242.2Memory model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252.2.1Memory regions, types and attributes . . . . . . . . . . . . . . . . . . . . . . . . . . 262.2.2Memory system ordering of memory accesses . . . . . . . . . . . . . . . . . . . 272.2.3Behavior of memory accesses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272.2.4Software ordering of memory accesses . . . . . . . . . . . . . . . . . . . . . . . . 282.2.5Bit-banding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292.2.6Memory endianness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312.2.7Synchronization primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322.2.8Programming hints for the synchronization primitives . . . . . . . . . . . . . . 332.3Exception model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342.3.1Exception states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342.3.2Exception types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342.3.3Exception handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362.3.4Vector table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372.3.5Exception priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372.3.6Interrupt priority grouping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382.3.7Exception entry and return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38PM0056ContentsDoc ID 15491 Rev 43/1552.4Fault handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412.4.1Fault types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412.4.2Fault escalation and hard faults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422.4.3Fault status registers and fault address registers . . . . . . . . . . . . . . . . . 432.4.4Lockup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432.5Power management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432.5.1Entering sleep mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号