ST AN3364 Application note

AN3364
Application note
Migration and compatibility guidelines for
STM32 microcontroller applications
Introduction
For designers of STM32 microcontroller applications, it is important to be able to easily replace one microcontroller type by another one in the same product series. Migrating an application to a different microcontroller is often needed, when product requirements grow, putting extra demands on memory size, or increasing the number of I/Os. On the other hand, cost reduction objectives may force you to switch to smaller components and shrink the PCB area. This application note is written to help you and analyze the steps you need to migrate from an existing STM32-based design to any one of the other microcontroller types in the fast-growing STM32 series.
To save your time, this application note groups together all the most important information and lists the vital aspects that you need to address.
All the information included here can also be extremely worthwhile in your first STM32 design, not immediately concerned by a migration project. Studying the issues now will help you tackle any future requirement by designing for compatibility from the beginning. To use this application note, general STM32 knowledge is required, you can learn it from the STM32 series reference manual, the STM32 datasheets, and the STM32 Flash program memory programming manuals.
This application note presents an overview of the whole STM32 series and presents a first level view of the different aspects that are important to consider when planning a new design or migrating. The microcontroller blocks and peripherals are grouped and identified either as fully compatible or compatible with enhancements, or presented by types of series.
However the details of the migration guidelines across STM32 series are documented in separate documents. Please refer to one of the following documents:
AN3427 Migrating applications from STM32F1 series to STM32F2 series.
AN3422 Migrating applications from STM32F1 series to STM32L1 series.
AN4088 Migrating applications from STM32F1 series to STM32F0 series.
Table 1. Applicable products
Typ e Part nu mbers
Microcontrollers STM32F0, STM32F1, STM32F2, STM32F4 and STM32L1 series
May 2012 Doc ID 018608 Rev 3 1/17
www.st.com
Contents AN3364
Contents
1 How to migrate across STM32 series . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1 STM32 series general overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.1 STM32 product series feature comparison . . . . . . . . . . . . . . . . . . . . . . . 6
1.1.2 STM32 product cross-compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2 Software migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2/17 Doc ID 018608 Rev 3
AN3364 List of tables
List of tables
Table 1. STM32 series overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Table 2. STM32 peripheral compatibility analysis F1 versus F0 series . . . . . . . . . . . . . . . . . . . . . . . 9
Table 3. STM32 peripheral compatibility analysis F1 versus F2 series . . . . . . . . . . . . . . . . . . . . . . 11
Table 4. STM32 peripheral compatibility analysis F1 versus F4 series . . . . . . . . . . . . . . . . . . . . . . 12
Table 5. STM32 peripheral compatibility analysis F1 versus L1 series . . . . . . . . . . . . . . . . . . . . . . 14
Table 6. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Doc ID 018608 Rev 3 3/17
How to migrate across STM32 series AN3364
1 How to migrate across STM32 series
1.1 STM32 series general overview
The STM32 platform forms a strong foundation with a broad and growing portfolio. With new products addressing new applications, the complete STM32 product series now comprises several series including STM32F0, STM32F1, STM32F2, STM32F4 and STM32L1, each dedicated to a specific segment:
STM32F0: The F0 series bridges the gap with applications using 8- and 16-bit
microcontrollers, enabling advanced high-end features in economical end products. The F0 series offers unparalleled flexibility and scalability for home-entertainment products, appliances, and industrial equipment.
STM32F1: The general-purpose F1 series addresses a wide range of applications,
from the lowest, price-sensitive designs to computing-intensive, high memory footprint ones. The F1 series is a complete series whose members are fully pin-to-pin, software and feature compatible.
Low density devices are STM32F101xx and STM32F103xx microcontrollers
where the Flash memory density ranges between 16 and 32 Kbytes.
Medium density devices are STM32F101xx and STM32F103xx microcontrollers
where the Flash memory density ranges between 32 and 128 Kbytes.
High density devices are STM32F101xx and STM32F103xx microcontrollers
where the Flash memory density ranges between 256 and 512 Kbytes.
XL density devices are STM32F101xx and STM32F103xx microcontrollers where
the Flash memory density ranges between 768 Kbytes and 1024 Kbytes.
Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers
where the Flash memory density ranges between 64 and 256 Kbytes.
Medium density value line devices are STM32F100xx microcontrollers where
the Flash memory density ranges between 64 and 128 Kbytes.
High density value line devices are STM32F100xx microcontrollers where the
Flash memory density ranges between 128 and 512 Kbytes.
STM32F2: The F2 series provides the highest performance for computing-intensive
applications and advanced connectivity. The F2 series maintains compatibility with the F1 series.
STM32F4: The ARM® Cortex™-M4-based F4 series is an extension of the industry-
leading STM32 portfolio towards even higher performance. Like the STM32 F2 series, these MCUs leverage ST‘s 90 nm NVM technology and ST’s ART Accelerator™ to reach the industry’s highest benchmark scores for Cortex-M-based microcontrollers with 210 DMIPS/469 Coremark executing from Flash memory at 168 MHz operating frequency.
4/17 Doc ID 018608 Rev 3
AN3364 How to migrate across STM32 series
STM32L1: Designed for ultra-low-power applications that are energy-aware and seek
to achieve the absolute lowest power consumption. The L1 series maintains compatibility with the F1 series.
Medium density devices are STM32L151xx and STM32L152xx microcontrollers
where the Flash memory density ranges between 64 and 128 Kbytes.
Medium+ density devices are STM32L151xx, STM32L152xx and STM32L162xx
microcontrollers where the Flash memory density is 256 Kbytes.
High density devices are STM32L151xx, STM32L152xx and STM32L162xx
microcontrollers where the Flash memory density is 384 Kbytes.
In the rest of this document (unless otherwise specified),
the terms F0, STM32F0 and STM32F0xx are used to refer to the STM32F0 series
the terms F1, STM32F1 and STM32F10x are used to refer to the STM32F1 series
the terms F2, STM32F2 and STM32F2xx are used to refer to the STM32F2 series
the terms F4, STM32F4 and STM32F4xx are used to refer to the STM32F4 series
the terms L1, STM32L1 and STM32L1xx are used to refer to the STM32L1 series
Doc ID 018608 Rev 3 5/17
How to migrate across STM32 series AN3364
1.1.1 STM32 product series feature comparison
Table 1. STM32 series overview
STM32 series
Peripheral
F1 L1 F2 F0 F4
Cortex-M3 r1p1
Core
FLASH memory
SRAM
FSMC Ye s N o Ye s N o Ye s
Max CPU frequency
Operating voltage 2.0 to 3.6 V 1.65 to 3.6 V 1.8 to 3.6 V 2.0 to 3.6 V 1.8 to 3.6 V
Bootloader
Advanced 4 channel (3 cmpl. out)
General purpose
MPU in XL-density only
16 / 32 / 64 / 128 / 256 / 384 / 512 / 768KB - 1 MB
6 / 10 / 20 / 24 / 32 / 48 / 64 / 96 KB
24 / 36 / 48 / 72 MHz depending on the product line used
Connectivity Line: USART1/2, CAN2, DFU (OTG FS Device)
Other product lines:USART1
up to 2 No 2 1 2
up to 10 7 up to 10
Cortex-M3 r2p0 w/ MPU
64/128 KB
10/16 KB 64/96/128 KB 8 KB 128 + 64 KB
32 MHz 120 MHz 48 MHz 168 MHz
Medium density: USART1/2
Medium+ and High density: USART1/2 + DFU (USB Device FS)
Cortex-M3 r2p0 w/ MPU
128 / 256 / 512 / 786 / 1024 KB
USART1/3, CAN2, DFU (OTG FS Device)
Cortex-M0
64 KB 512 / 1024 KB
USART1/2
5 (16-bit) 1 (32-bit)
Cortex-M4 r0p1 w/ FPU and MPU
USART1/3, CAN2, DFU (OTG FS Device)
10
Timers
RTC Counter
6/17 Doc ID 018608 Rev 3
4 channels up to 4 4 up to 4 2 4
2 channels up to 2 1 up to 2
1 channel up to 4 2 up to 4
Basics up to 2 2 2 1 2
Hardware calendar
Hardware calendar
1(w/ 1Cmpl out)
1 + 2(w/ 1compl out)
Hardware calendar + subseconds
2
4
Hardware calendar + subseconds
Loading...
+ 11 hidden pages