什么是STM32?•新的基于ARM内核的32位MCU系列–内核为ARM公司为要求高性能、低成本、低功耗的嵌入式应用专门设计的Cortex-M3内核–标准的ARM架构•超前的体系结构–高性能–低电压–低功耗–创新的内核以及外设•简单易用/自由/低风险•管脚,软件和外设全线兼容•FLASH–32KB,64KB,128KB.256KB,512KB•RAM–6KB,10KB,20KB,64KB•封装–LQFP-48/LQFP-64/LQFP-100/BGA-100•电压范围2.0到3.6V•I/O电压容限为5VSTM32系列介绍STM32系列介绍72MHzCORTEX-M3CPUWideoffer•32KB-512KBFlash•6Kb-64KBRAMFlashSize(bytes)256K512K100pinsLQFP(14x14)/BGA32K64K64pinsLQFP(10x10)48pinsLQFP(7x7)144pinsLQFP(20x20)/BGA0K未来发展方向STM32SamplesNOWProdOct07STM32prodQ2/08SamplesDec07ProdQ2/08STM32F10x的两条产品线STM32F101“基本型”系列STM32F103“增强型”系列•在32位的FLASHMCU中性能最强•整体信号处理方面胜过DSP解决方案•出众的控制和连通性•非常适合低电压/低功耗的应用场合•16位处理器的价格却拥有32位的性能•STM32系列中的入门级产品•非常适合低电压/低功耗的应用场合STM32F10x的两条产品线Bothlineshaveupto:5xUSART2xSPI2xI2CRTC11+DMA2xWDG5x16-bitTIMERS80%GPIOratio12bADC(1µs)Tempsensor36MHzCPUUpto48KBSRAMUpto512KBFLASHUpto64KBSRAMCANUSBACtimerEMI*2x12bADC(1µs)TempsensorDAC*72MHzCPUInt8MHzRCInt32kHzRCPOR/PDR/PVDbrownout“基本型”系列“增强型”系列EMI*DAC*I2S**只有在Flash大于256KB(包含)的芯片上才包括DAC,EMI(144pins),I2S,SDIOSDIO*STM32F103“增强型”系列•2V-3.6V供电电压•5VI/Os电压容限•出色的时钟安全模式•带有唤醒功能的低功耗模式•内部RC•嵌入的RESET•-40/+85°C(工业级)*仅限144脚的封装**只有在Flash大于256KB(包含)的芯片上才包括DAC,EMI(144pins),I2S,SDIO,图象传感器CORTEXM3CPU72MHz6kB-64kBSRAMARMPeripheralBus(max72MHz)2x12-bitADC16channels/1Msps1/2xI2C0/1xSPI1/2/4xUSART/LINSmartcard/IrDaModemControl32/49/80*I/OsUpto16Ext.ITsFlashI/F32kB-512kBFlashMemoryTempSensor1xUSB2.0FS1xbxCAN2.0B6x16-bitPWMSynchronizedACTimer2xWatchdog(independent&window)2/3/5x16-bitTimerExternalMemoryInterface**JTAG/SWDebugXTALoscillators32KHz+4~16MHzPowerSupplyReg1.8VPOR/PDR/PVDDMA3to11*ChannelsNestedvectITCtrl2xSPI/I2S**2xDAC**1xSDIO**ImageSensor**1xUSART/LINSmartcard/IrDaModem-Ctrl1xSPIBridgeBridge1xSysticTimerARMLiteHi-SpeedBusMatrix/Arbiter(max72MHz)Int.RCoscillators32KHz+8MHzPLLClockControlRTC/AWUARMPeripheralBus(max36MHz)20BBackupRegsSTM32F101“基本型”系列•2V-3.6V供电电压•5VI/Os电压容限•出色的时钟安全模式•带有唤醒功能的低功耗模式•内部RC•嵌入的RESET•-40/+85°C(工业级)**只有在Flash大于256KB(包含)的芯片上才包括DAC,EMI(144pins),I2S,SDIO,图象传感器CORTEXM3CPU36MHz6kB-48kBSRAMARMPeripheralBus(max36MHz)1x12-bitADC16channels/1Msps1/2xI2C0/1xSPI1/2/4xUSART/LINSmartcard/IrDaModemControl32/49/80*I/OsUpto16Ext.ITsFlashI/F32kB-512kBFlashMemoryTempSensor2xWatchdog(independent&window)2/3/5x16-bitTimerExternalMemoryInterface**JTAG/SWDebugXTALoscillators32KHz+4~16MHzPowerSupplyReg1.8VPOR/PDR/PVDDMA3to11*ChannelsNestedvectITCtrl2xDAC**1xUSART/LINSmartcard/IrDaModem-Ctrl1xSPIBridgeBridge1xSysticTimerARMLiteHi-SpeedBusMatrix/Arbiter(max36MHz)Int.RCoscillators32KHz+8MHzPLLClockControlRTC/AWUARMPeripheralBus(max36MHz)20BBackupRegs6KBRAM*6KBRAM*STM32F103“增强型”系列FlashSize(bytes)128K256K512K100pinsLQFP/BGASTM32F103Rx20KBRAMSTM32F103Rx20KBRAMSTM32F103Cx20KBRAM32K64KSTM32F103Rx64KBRAMSTM32F103Vx20KBRAMSTM32F103Vx64KBRAMSTM32F103Vx20KBRAMSTM32F103Vx64KBRAM3xUSART3x16-bittimer2xSPI,2XI2CUSB,CAN,PWM2xADC64pinsLQFP48pinsLQFP2xUSART2x16-bittimer1xSPI,1xI2CUSB,CAN,PWM2xADC5xUSART5x16-bittimer2xSPI,2XI2CUSB,CAN,PWM2xADC,2xDAC,I2SEMI(144pinsonly)STM32F103Rx64KBRAM144pinsLQFP/BGASTM32F103Zx64KBRAMSTM32F103Zx64KBRAMSTM32R103Zx64KBRAMSTM32F103Cx10KBRAMSTM32F103Rx10KBRAM*32kBdevicesexistw/otheCANandUSB,with6kBofRAM0KSamplesApril07ProductionOct07SamplesDec07ProductionQ208STM32F101“基本型”系列FlashSize(bytes)128K256K512K100pinsLQFPSTM32F101Rx10KBRAMSTM32F101Rx16KBRAMSTM32F101Cx10KBRAM32K64KSTM32F101Rx32KBRAMSTM32F101Vx16KBRAMSTM32F101Vx32KBRAMSTM32F101Vx10KBRAMSTM32F101Vx48KBRAM3xUSART3x16-bittimer2xSPI,2XI2C,64pinsLQFP48pinsLQFP2xUSART2x16-bittimer1xSPI,1xI2C5xUSART5x16-bittimer2xSPI,2XI2C,2xDAC,EMI(144pinsonly)144pinsLQFPSTM32F101Zx32KBRAMSTM32F101Zx48KBRAMSTM32F101Cx6KBRAMSTM32F101Rx6KBRAMSamplesApril07ProductionOct07SamplesDec07ProductionQ208STM32通用平台STM32概念标准的ARMTMCortex-M3内核高性能外设提供两个完整的产品系列开发工具以及软件支持各系列产品全面兼容FamilyToolsPeriphsCore优点•可升级的体系结构•适用你所有的应用•给用户相同的“外观和感受”•统一的软件和开发投入Cortex-M3处理器集成了内核和高级系统外设的分级处理器•Cortex-M3内核–哈佛体系结构–拥有分支预测功能的三级流水线–Thumb®-2指令集和传统的Thumb指令集–带有硬件除法和单信号周期乘法的ALU•Cortex-M3处理器–Cortex-M3内核–可配置的中断控制器–总线矩阵–先进的调试组件–可选择的MPU&ETMCortex-M3处理器概述•哈佛结构•指令总线和数据总线分离,允许并行地取指和数据存储•1.25DMIPS/MHz,0.19mW/MHz•Thumb-2指令集拥有32位的性能和16位的代码密度•单周期乘法和硬件除法•Cortex-M3核内部集成了嵌入式高速中断控制器:•低中断响应时间,最低可达6个CPU周期(内部中断)•从低功耗模式被唤醒也只需6个CPU周期•相比于ARM7TDMI,Cortex-M3内核要快35%且减少了45%的代码Cortex-M3处理器概述三级流水线-取指,解码和执行单信号周期乘法硬件除法-UDIV&SDIV-指令执行需要2到12周期,取决与被除数与除数-两者越相近指令完成越快-指令可以被中断(丢弃/重启)Cortex-M3处理器概述132b32bx16b3-7*64b32bx32b132b32bx32b132b16bx16bCyclesDestinationSourceCortex-M3VSARM7:主要参数比较1.25Thumb-20.74Thumb/0.93ARMDMIPS/MHzxPSR.2modes.Stackedregs(1bank)PSR.6modes.20Bankedregs系统状态ArchitectureDefinedUndefined存储器印射ThreeNo睡眠模式12Cycles(6whenTailChaining)24-42Cycles(DependingonLSM)中断响应时间NMI,SysTickandupto240interrupts.IntegratedNVICInterruptControllerupto1-255PrioritiesFIQ/IRQ中断3-Stage+BranchSpeculation3-Stage流水线Thumb-2(Merged32/16-bit)ARM(32-bit)&Thumb(16-bit)指令集v7Mv4T体系结构Cortex-M3ARM7TDMI-SCortex-M3附加的特性简化了跟踪调试接口的管脚,从9脚减少到2或3脚硬件中断处理不需要汇编代码综合的原子位操作改进了数据存储扩展的数据观测点&Flash保护技术嵌入式的睡眠控制和掉电模式可选择的小型的存储器保护单元(MPU)和嵌入式跟踪宏单元(ETM)出色的功耗表现高性能并不等于高功耗,STM32提出3种主要的能耗方案:•Run模式:高动态功效•Standby模式:极低的功耗•能够工作在由电池直接供电的低电压状态下在