STM32 MCU family 32-bit Flash microcontrollers powered by ARM® Cortex™-M3 June 2007 www.st.com/mcu Welcome to the world of STM32 Releasing your creativity The STM32 family of 32-bit Flash microcontrollers is based on the breakthrough ARM Cortex-M3 core – a core specifically developed for embedded applications requiring a combination of high performance, low power and low cost. The STM32 family benefits from the Cortex-M3 architectural enhancements, including the Thumb-2® instruction set to deliver improved performance combined with better code density, and a tightly coupled nested vectored interrupt controller for significantly faster response to interrupts, all combined with industry-leading power consumption. STMicroelectronics was a lead partner in developing the Cortex-M3 core and is now the first leading MCU supplier to introduce a product family based on the core. The right core The STM32 family is built to offer new degrees of freedom to MCU users. It offers a complete 32-bit product range that combines high performance, low power and low voltage, while maintaining full integration and ease of development. It eases migration from the 16-bit world thanks to its high level of features integration, its easy-to-use architecture, its low power capability and cost-effectiveness. This new family will enable you to create new applications, and design in the innovations you have been long dreaming about. The right choice The world of STM32 The STM32 is built around the industry-standard ARM 32-bit RISC architecture. The Cortex-M3 is the latest core from ARM. The Cortex-M3 core targets the microcontroller and embedded markets. The advanced architectural features of the Cortex-M3 processor reduce memory size while delivering industry-leading performance in a small, power-efficient RISC core. It thus provides an ideal platform for the migration of many different applications around the world from legacy devices to 32-bit microcontroller world. Core Cortex-M3 ■ Open world of ARM ■ Standard core Peripherals ■ High performance and low power ■ High level of integration ■ Innovate in development Product range ■ Full family pin-to-pin, peripheral and software-compatible ■ Rationalize your development ® Tools and software ■ Best ecosystem of software and tools ARM: driving momentum The STM32 family gives you more performance and features without compromising power and cost. 4.5bn/year by 2010 Mobile Mobile Non-mobile As a result: 1.You access the open world of ARM technology with a standard core and the best ecosystem of software and tools 2.You rationalize your development, because the same family fits many platforms 3.You innovate in your projects with the latest software technology (such as RTOS), and by rethinking your hardware and software partitioning to bring breakthrough improvements in your applications 2x Non-mobile 4x Embedded 10x Embedded/Microcontroller 600 550 2bn units/year 500 450 400 350 The ST microcontroller offer focus 300 250 200 150 100 50 Q306 Q206 Q106 Q405 Q305 Q205 Q105 Q404 Q304 Q204 Q104 Q403 Q303 Q203 Q103 Q402 Q302 Q202 Q102 Q401 Q301 Q201 Q101 0 2006 2010 The STM32 key benefits ■ ■ ■ ■ ■ STM32, the optimal platform choice Leading-edge architecture with the latest Cortex-M3 core from ARM Superior and innovative peripherals Outstanding power efficiency Maximum integration Easy development, fast time to market The STM32 is an optimal choice to support many applications with the same platform: ■ From reduced memory and pin requirements to larger needs ■ From performance demanding to battery operated ■ From simple cost-sensitive to complex high-value The high level of pin-to-pin, peripheral and software compatibility across the family gives you full flexibility. You can upgrade to a higher or downgrade to a lower memory size, or use different packages without changing your initial layout or software. STM32F10x portfolio Flash size (bytes) 512 KB 72 MHz Cortex-M3 CPU – wide selection of devices: ■ 6 KB to 20 KB SRAM ■ Two lines: Performance and Access ■ Pin-to-pin, software and peripheral compatibility across family ■ 2.0 to 3.6 V power supply/ 5 V tolerant I/Os ■ -40 to +85°C or up to 105°C operating temperature range Under development 256 KB Available now 128 KB STM32F103RB STM32F101RB STM32F103VB STM32F101VB STM32F103V8 STM32F101V8 64 KB STM32F103C8 STM32F101C8 STM32F103R8 STM32F101R8 32 KB STM32F103C6 STM32F101C6 STM32F103R6 STM32F101R6 48 pins LQFP 64 pins LQFP 0 KB 100 pins LQFP/BGA 144 pins LQFP/BGA Performance line Access line Device summary Part number Program memory type Prog. (Bytes) RAM (Bytes) Flash Timer functions Serial interface 12 or 16-bit (IC/OC/PWM) Others I/Os (High current 2) Packages Supply voltage STM32 (ARM Cortex-M3) - 32-bit Microcontrollers STM32F101C6 • 32 K 6K 2x16-bit (8/8/8) 1xSPI/1xI²C/2xUSART* 32(32) LQFP48 2 to 3.6 V STM32F101C8 • 64 K 10 K 2x16-bit (8/8/8) 2xSPI/2xI²C/3xUSART* 32(32) LQFP48 2 to 3.6 V STM32F101R6 • 32 K 6K 2x16-bit (12/12/12) 2xSPI/2xI²C/3xUSART* 49(49) LQFP64 2 to 3.6 V STM32F101R8 • 64 K 10 K 3x16-bit (12/12/12) 2xSPI/2xI²C/3xUSART* 49(49) LQFP64 2 to 3.6 V STM32F101RB • 128 K 16 K 3x16-bit (12/12/12) 2xSPI/2xI²C/3xUSART* 49(49) LQFP64 2 to 3.6 V 100 pins STM32F101V8 • 64 K 10 K 3x16-bit (12/12/12) 2xSPI/2xI²C/3xUSART* 80(80) LQFP100 2 to 3.6 V STM32F101VB • 128 K 16 K 3x16-bit (12/12/12) 2xSPI/2xI²C/3xUSART* 80(80) LQFP100 2 to 3.6 V 48 pins STM32F103C6 • 32 K 10 K 3x16-bit (12/12/14) 1xSPI/1xI²C/2xUSART*/USB/CAN 32(32) LQFP48 2 to 3.6 V STM32F103C8 • 64 K 20 K 4x16-bit (16/16/18) 2xSPI/2xI²C/3xUSART*/USB/CAN 32(32) LQFP48 2 to 3.6 V STM32F103R6 • 32 K 10 K 3x16-bit (12/12/14) 1xSPI/2xI²C/3xUSART*/USB/CAN 49(49) LQFP64 2 to 3.6 V STM32F103R8 • 64 K 20 K 4x16-bit (16/16/18) 2xSPI/2xI²C/3xUSART*/USB/CAN 49(49) LQFP64 2 to 3.6 V STM32F103RB • 128 K 20 K 4x16-bit (16/16/18) 2xSPI/2xI²C/3xUSART*/USB/CAN 49(49) LQFP64 2 to 3.6 V STM32F103V8 • 64 K 20 K 4x16-bit (16/16/18) 2xSPI/2xI²C/3xUSART*/USB/CAN 80(80) LQFP100/BGA100 2 to 3.6 V STM32F103VB • 128 K 20 K 4x16-bit (16/16/18) 2xSPI/2xI²C/3xUSART*/USB/CAN 80(80) LQFP100/BGA100 2 to 3.6 V 48 pins 64 pins 64 pins 100 pins 2xWDG, RTC, 24-bit down counter *(IrDA/ISO7816) Applications STM32F10x block diagram Industrial: ■ PLC ■ Inverters ■ Printers, scanners ■ Industrial networking Cortex-M3 CPU 36/72 MHz JTAG/SW debug Nested vect. IT ctrl 1 x systic timer Building and security: ■ Alarm systems ■ Video intercom ■ HVAC Flash I/F ® DMA 7 channels 32 KB-128 KB Flash memory 6 KB-16/20 KB SRAM ARM Lite high-speed bus matrix/ arbiter (max. 72 MHz) 20 B backup registers Clock control Bridge 32/49/80 I/Os (max. 72 MHz) ARM peripheral bus Up to 16 ext. ITs 1 x USART/LIN smartcard/IrDA modem control Consumer: ■ PC peripherals, gaming ■ Digital camera, GPS platforms PLL RTC/AWU (max. 36 MHz) Bridge 6 x 16-bit PWM synchronized AC timer 1 x SPI Appliances: ■ Motor drive ■ Application control XTAL oscillators 32 kHz + 4~16 MHz Int. RC oscillators 32 kHz + 8 MHz ARM peripheral bus Low power: ■ Glucose meters ■ Power meters ■ Battery operated applications Power supply Reg 1.8 V POR/PDR/PVD DMA: Direct memory access RTC: Real-time clock AWU: Auto wake-up capability with RTC alarm 3 x 16-bit timer 1 x USB 2.0FS 2 x watchdog (independent & window) 1 x bxCAN 2.0B 2 x USART/LIN smartcard/ IrDA modem control 1 or 2 x 12-bit ADC 16 channels/1Msps 1 x SPI Temp sensor 2 x I2C POR: Power-on reset PDR: Power-down reset PVD: Programmable voltage detector STM32, more choice with two complete lines The Performance line, STM32F103, operates at 72 MHz, with more on-chip RAM and peripherals. The Access line, STM32F101, operates at 36 MHz. Both lines are pin-to-pin and software-compatible, and offer the same embedded Flash options. The Performance line takes the 32-bit MCU world to new levels of performance and energy efficiency. With its Cortex-M3 core at 72 MHz, it is able to perform high-end computation. Its peripheral set brings superior control and connectivity. The Access line is the entry point of the STM32 family. It has the power of the 32-bit MCU but at a 16-bit MCU cost. Its peripheral set offers excellent connectivity and control. STM32F10x: two first product lines Both lines include up to: Up to 128 KB Flash 3 x USART 2 x SPI 2 x I2C Performance line STM32F103 72 MHz CPU Up to 20 KB SRAM 2 x 12-bit ADC (1 µs) Temp sensor 3 x 16-bit timers Main osc. 4-16 MHz Internal 8 MHz RC and 32 kHz RC Real-time clock 2 x watchdogs Reset circuitry Power on/down reset Voltage detector 7 channels DMA 80% GPIO ratio Access line STM32F101 36 MHz CPU Up to 16 KB SRAM 1 x 12-bit ADC (1 µs) Temp sensor USB CAN PWM timer STM32 key benefits Leading-edge architecture with Cortex-M3 core ■ ■ ■ ■ ■ Harvard architecture 1.25 DMIPS/MHz and 0.19 mW/MHz Thumb-2 instruction set brings 32-bit performance with 16-bit code density Single cycle multiply and hardware division Embedded, fast interrupt controller is now inside the core allowing: ■ Low latency down to six CPU cycles inter-interrupt ■ Six CPU cycles wake-up time from low power mode Up to 35% faster and up to 45% less code than ARM7TDMI® D rating 100 CORTEX-M3 (Thumb-2) Core performance DMIPS ■ 80 ARM7TDMI (ARM) 60 ARM7TDMI (Thumb) 40 20 0 0 10 20 30 40 50 60 70 fCPU (MHz) Outstanding power efficiency High performance does not mean high power consumption. We have taken special care to address three main energy requirements driven by the market: ■ High dynamic power efficiency in running mode ■ Extremely low power when the application is in standby ■ Low voltage capability for direct battery operation In run mode, executing from Flash at full 72 MHz CPU speed, the STM32 has a current consumption as low as 36 mA (0.5 mA/MHz). In standby mode, current consumption is as low as 2 µA typical. Finally, its 2.0 to 3.6 V power supply enables its use for battery operated applications. The STM32 has three different low power modes and a versatile clocking scheme so that users can optimize power consumption versus performance. The STM32 also embeds a real-time clock (RTC) running either from a 32 kHz quartz oscillator or an internal RC. The RTC has a separate power domain, with an embedded switchover to run either from a dedicated coin cell battery or from the main supply. Its typical current consumption is 1.5 µA at 3.3 V. It embeds 20 bytes for data backup. Start-up time from low power modes is lower than 10 µs typical from stop mode, and 40 µs typical from standby mode and reset. STM32F10x: Low power µA typical @ 25°C Low voltage 2.0 V to 3.6 V operation 0.5 mA/MHz in Run mode from Flash ■ Startup time from Stop < 10 µs Startup time from Standby 40 µs ■ Reset circuitry always active ■ <20 µA ■ 3.5 µA Stop 2 µA 1.5 µA Standby RTC on Standby RTC off RTC Vbat High level of integration Built-in supervisor reduces need for external components: ■ Power-on reset, low voltage detect, brown-out detect, watchdog timer with independent clock ■ One main crystal drives entire system: ■ Inexpensive 4-16 MHz crystal drives CPU, USB and all peripherals ■ Embedded PLL generates multiple frequencies ■ Optional 32 kHz crystal for RTC ■ Embedded accurate 8 MHz RC can be used as main clock: ■ Factory trimmed ■ Additional low frequency RC for RTC or watchdog ■ Only 7 external passive components required for base system on LQFP100 package ■ Superior and innovative peripherals The STM32 benefits from a dual advanced peripheral bus (APB) architecture, one of which is a high-speed APB (up to CPU frequency). Peripherals have been connected on this bus to increase peripheral speed: Motor control The STM32 performance line embeds timers and ADC features that are perfectly suited to three-phase brushless motor control. The advanced control PWM timer offers: ■ Six outputs ■ Dead-time generation ■ Edge-aligned and center-aligned waveforms ■ Emergency stop and synchronization capability with the dual ADC, synchronization capability with other timers ■ Programmable smoke inhibit feature to protect registers against unwanted writing ■ Encoder input 7 power capacitors only! The need for speed USB 12 Mbit/s USART up to 4.5 Mbit/s SPI 18 MHz master and slave I2 C 400 kHz GPIO 18 MHz maximum toggle PWM timer 72 MHz clock input The dual ADC architecture allows dual sample and hold capability with 12-bit resolution, 1 µs conversion time. The dual ADC is controlled by two independent sequencers with discontinuous mode, multiple trigger sources, and channel-by-channel programmable sampling time. This dedicated set of peripherals combined with the high performance of the Cortex-M3 core allows your software to shorten the total vector control loop to typically 20 µs (sensor mode, three-phase PMSM motor). The CPU load is below 25% at 10 kHz current sampling frequency. STM32 easy development, fast time to market From ideas to reality. As easy as 1, 2, 3 Idea 1 STM32 STM32 tools Ready-to-use software Simple and powerful Starter kits IDE compilers Debugger RTOS Firmware library USB Motor control 2 Product 3 STM32 firmware library The STM32 firmware library provides easy access to all features of the standard device peripherals of the STM32. This free software package provides drivers for all standard device features and peripherals from GPIO and timers to CAN, I2C, EMI, SPI, UART, ADC and more. The fully documented and tested C source code requires only basic knowledge of C programming, is compatible with any C compiler for ARM core-based microcontrollers, and is MISRA C-compliant (latest rules). The STM32 library shares the same API with the STR7 and STR9 libraries. USB developer kit The USB developer kit facilitates USB implementation in a full range of applications by providing a complete, USB-certified firmware package that allows developers to painlessly develop any flavor of USB firmware including: ■ Control transfer with generic device management tasks ■ Interrupt transfer with HID mouse/joystick demo ■ Bulk transfer with mass storage demo ■ Isochronous transfer with voice speaker/microphone demo The kit implements DFU for firmware updates on USB, and Virtual COM (CDC class) for emulation of an RS232 interface on USB. STM32 motor control firmware library for vector drive Optimized and documented C firmware libraries for control of both PMSM and AC induction brushless motors in vector mode (FOC) are provided for free upon request. These modular libraries support both types of motors in standalone mode using ST hardware. The source files are provided free of charge and are MISRA C (latest rules)-compliant, which helps for compliancy with IEC60730. Internet support The latest news, downloads and documentation for STM32 microcontrollers can be found at: www.st.com/stm32 Here, you will also find: ■ A complete selection guide for ST microcontrollers and development tools ■ Downloads of free software and documentation ■ Microcontroller and application-specific online forums and FAQs For further information about a specific third-party tool, please visit the website of the relevant third-party tool supplier. Development tools Low-cost starter kits ST’s 32-bit STM32 microcontrollers are supported by a complete range of high-end and low-cost development tools. This extensive line includes easy-to-use starter kits, complete development tool solutions, programming tools and embedded operating systems, all tailored for STM32 ARM Cortex-M3-based MCUs. As for our other ARM-based microcontrollers, we are developing with our partners a set of low-cost starter kits. These are complete (evaluation board, emulator, software toolset), low-cost, out-of-the-box solutions from Hitex, IAR, Keil and Raisonance for evaluating and starting development on the STM32. Third-party software and tools Users can choose from a full range of development solutions that deliver start to finish control of application development from a single environment. Solutions come with in-circuit emulators, and offer project management, source editing, application building and debugging from a single, easy-to-use graphical interface. They are available for all popular C/C++ compilers compatible with ARM cores. IDE supplier Contact Hitex: www.hitex.com IAR: www.iar.com Keil: www.keil.com Raisonance: www.raisonance.com Rowley: www.rowley.co.uk Part number Description Hitex STM32 starter kit Kit includes HiTOP5 (16 K code-size limited version), GNU C/C++ compiler, debugger and USB stick with STM32 device evaluation features and integrated in-circuit debugging/programming capability IAR KickStart kit for STM32 Kit includes IAR Embedded Workbench for ARM (EWARM – 32 K code-size limited version), J-Link (USB/JTAG) in-circuit emulator and evaluation board for STM32 Keil STM32 starter kit Kit includes RealView Microcontroller Development Kit for ARM (16 K code-size limited version) with ARM C/C++ compiler, ULINK (USB/JTAG) in-circuit emulator and evaluation board for STM32 Raisonance REva kit for STM32 Kit includes RIDE (32 K code-size limited version) with GNU C/C++ compiler, debugger, RLink (USB/JTAG) in-circuit emulator, demonstration motherboard and daughter board for STM32 Evaluation board STM3210B-EVAL The STM32 is already supported by a range of portable royalty-free, small-footprint operating systems to meet a variety of application constraints from low cost to high security. RTOS supplier RTOS Micrium: www.micrium.com uC/OSII www.FreeRTOS.org FreeRTOS Segger: www.segger.com embOS Keil: www.keil.com ARTX-ARM IAR: www.iar.com PowerPac CMX Systems: www.cmx.com CMX-RTX Complete hardware evaluation platform with the STM32F103, implementing the full range of device peripherals and features. Contact your ST sales office. © STMicroelectronics - June 2007 - Printed in Italy - All rights reserved The STMicroelectronics corporate logo is a registered trademark of the STMicroelectronics group of companies. All other names are the property of their respective owners. Order code: BRSTM320607