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 ePart nu mbers
MicrocontrollersSTM32F0, STM32F1, STM32F2, STM32F4 and STM32L1 series
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/17Doc ID 018608 Rev 3
AN3364How 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 35/17
How to migrate across STM32 seriesAN3364
1.1.1 STM32 product series feature comparison
Table 1.STM32 series overview
STM32 series
Peripheral
F1L1F2F0F4
Cortex-M3 r1p1
Core
FLASH memory
SRAM
FSMCYe sN oYe sN oYe s
Max CPU frequency
Operating voltage2.0 to 3.6 V1.65 to 3.6 V1.8 to 3.6 V2.0 to 3.6 V1.8 to 3.6 V
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 KB512 / 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
RTCCounter
6/17Doc ID 018608 Rev 3
4 channels up to 44up to 424
2 channels up to 21up to 2
1 channelup to 42up to 4
Basicsup to 22212
Hardware
calendar
Hardware
calendar
1(w/ 1Cmpl
out)
1 + 2(w/
1compl out)
Hardware
calendar +
subseconds
2
4
Hardware
calendar +
subseconds
AN3364How to migrate across STM32 series
Table 1.STM32 series overview (continued)
STM32 series
Peripheral
F1L1F2F0F4
SPI(I2S)up to 3(2)23(2)2(1)3(2)
TI modeNoNoYesYesYes
Max freq.up to 18 Mbits/s
up to16
Mbits/s
up to 15 or 30
Mbits/s
up to 18
Mbits/s
up to 37.5 Mbits/s
Audio freq. 8 kHz up to 96 kHzNo
I2Cup to 22322
Max freq.400 kHz400 kHz400 kHz1Mbit/s400 kHz
USARTup to 33424
COMs
GPIOs26/37/51/80/11237/51/8351/82/114/14027/39/55up to 140
12-bit ADCup to 31313
UARTup to 2No2-2
Max freq.2.25 or 4.5 Mbit/sup to 4 Mbit/s
USB
CANup to 2No2No2
SDIO1No1No1
CECup to 1NoNo1No
Ethernet
MAC
Max sampling freq. 1 MSPS1 MSPS2 MSPS1 MSPS2.4 MSPS
USB Device FS
OTG FS
Yes w/ HW IEEE
1588 v1
USB Device
FS
No
8 kHz up to 192
kHz
3.75 or 7.5
Mbit/s
OTG FS
OTG HS
Yes w/ HW
IEEE1588 v2
8 kHz to 192
kHz
6 Mbit/s10.5 Mbit/s
No
No
No
8 kHz to 192 kHz
OTG FS
OTG HS
Yes w/ HW
IEEE1588 v2
Number of
channels
12-bit DAC22212
Max sampling freq. 1 MS/s1 MS/s 1 MS/s1 MS/s1 MS/s
Number of
channels
ComparatorsNo2No2No
LCD (COM x SEG)No4x44/ 8x40NoNoNo
DCMINoNoYesNoYes
Crypto/hash
processor
10/16/21 channels
22212
NoNo
16/20/24
channels
Doc ID 018608 Rev 37/17
16/24 channels
Ye s
DES, 3DES,
AES 256-bit,
SHA-1, MD5,
HMAC
16+3
channels
No
up to 24 channels
Ye s
DES, 3DES, AES
256-bit, SHA-1,
MD5, HMAC
How to migrate across STM32 seriesAN3364
Table 1.STM32 series overview (continued)
STM32 series
Peripheral
F1L1F2F0F4
RNGNoNoYesNoYes
UFQFPN32
VFQFPN36
LQFP48LQFP48LQFP48
VFQFPN48VFQFN48
LQFP64LQFP64LQFP64LQFP64LQFP64
BGA64
WLCSP64WLCSP64
Package
TFBGA64
WLCSP90
LQFP100LQFP100LQFP100LQFP100
BGA100BGA100
LFBGA100
LQFP144LQFP144LQFP144
BGA144
UFBGA176UFBGA176
LQFP176
8/17Doc ID 018608 Rev 3
AN3364How to migrate across STM32 series
1.1.2 STM32 product cross-compatibility
The STM32 series embeds a set of peripherals which can be classed in three categories:
●The first category is for the peripherals which are by definition common to all products.
Those peripherals are identical, so they have the same structure, registers and control
bits. There is no need to perform any firmware change to keep the same functionality at
the application level after migration. All the features and behavior remain the same.
●The second category is for the peripherals which are shared by all products but have
only minor differences (in general to support new features), so migration from one
product to another is very easy and does not need any significant new development
effort.
●The third category is for peripherals which have been considerably changed from one
product to another (new architecture, new features...). For this category of peripherals,
migration will require new development at application level.
Ta bl e 2 through toTa bl e 5 gives a general overview of this classification:
Table 2.STM32 peripheral compatibility analysis F1 versus F0 series
Peripheral
SPIYe s
WWDGYesYesSame featuresNAFull compatibility
IWDG /
IWWDG
DBGMCUYe sYe s
CRCYe s
EXTIYe sYe s +
CECYe s
DMAYe sYe s
Series Compatibility
F1 F0CommentsPinoutSW compatibility
Two FIFO available, 4 bit to 16
bit data size selection
No JTAG, No Trace
Added reverse capability and
initial CRC value
Some peripherals are able to
generate event in stop mode
Kernel clock, arbitration lost
flag and automatic transmission
retry, multi-address config,
wake up from stop mode
1 DMA controller with 5
channels
Identical
Identical for the
SWD
NAPartial compatibility
IdenticalFull compatibility
Identical
NAFull compatibility
Partial compatibility
Partial compatibility
Partial compatibility
Ye s
Ye s +
Ye s + +Added a Window modeNAPartial compatibility
Ye s +
Ye s + +
TIMYe sYe s +EnhancementIdenticalFull compatibility
PWRYe sYe s +
RCCYe sYe s +New HSI14 dedicated to ADC
No Vref, Vdda can be greater
than Vdd, 1.8 mode for core.
Doc ID 018608 Rev 39/17
Identical for the
same feature
PD0 & PD1 =>
PF0 & PF1 for the
osc
Partial compatibility
Partial compatibility
How to migrate across STM32 seriesAN3364
Color key:
= New feature or new architecture (Yes++)
= Same feature, but specification change or enhancement (Yes+)
= Feature not available (NA)
Table 2.STM32 peripheral compatibility analysis F1 versus F0 series (continued)
Series Compatibility
Peripheral
F1 F0CommentsPinoutSW compatibility
Choice for independant clock
USARTYe sYe s +
sources, Time out feature,
wake up from stop mode
IdenticalFull compatibility
I2CYe s
DACYe s
ADCYe sYe s + +
RTCYe s
FLASHYe s
GPIOYe s
CANYe s
USB FS
device
EthernetYe s
SDIOYe s
FSMCYe s
Touch
sensing
Ye s
NAYesNANANA
Ye s + +
Ye s +DMA underrun interruptIdenticalFull compatibility
Ye s + +
Ye s +Option byte modifiedNAPartial compatibility
Ye s + +New peripheral4 new GPIOs Partial compatibility
NANANANA
NANANANA
NANANANA
NANANANA
NANANANA
Bug fix, FM+, wake up from
stop mode, Digital filter
Same analogic part, but new
digital interface
Subsecond precision, digital
calibration circuit, Time-stamp
function for event saving,
programmable alarm
IdenticalFull compatibility
Identical
Identical for the
same feature
Partial compatibility
New driver
COMP
SYSCFG
10/17Doc ID 018608 Rev 3
NAYesNANANA
NAYesNANANA
AN3364How to migrate across STM32 series
Table 3.STM32 peripheral compatibility analysis F1 versus F2 series
Bug fix / Max baudrate / One
Sample Bit / Oversampling by 8
IdenticalFull compatibility
IdenticalFull compatibility
Partial
compatibility
AN3364How to migrate across STM32 series
Color key:
= New feature or new architecture (Yes++)
= Same feature, but specification change or enhancement (Yes+)
= Feature not available (NA)
Table 4.STM32 peripheral compatibility analysis F1 versus F4 series (continued)
Compatibility
PeripheralF1 series F4 series
CommentsPinoutSW compatibility
I2CYesYe s +Bug fixIdenticalFull compatibility
TIMYes
DACYes
EthernetYes
SDIOYes
USB OTG FS YesYe s +
RTCYes
ADCYes
FLASHYesYe s + +New peripheralNA
DMAYes
GPIOYesYe s + +New peripheralIdentical
CECYes
Ye s +
Ye s +DMA underrun interruptIdenticalFull compatibility
Ye s +
Ye s +Bug fixIdenticalFull compatibility
Ye s + +New peripheral
Ye s + +New peripheral
Ye s + +New peripheralNA
NANANANA
32-bit Counter in TIM2 and
TIM5
IEEE1588 v2 / Enhanced DMA
descriptor
- Dynamic trimming capability of
SOF framing period in Host
mode
- Embeds a VBUS sensing
control
IdenticalFull compatibility
IdenticalFull compatibility
IdenticalFull compatibility
Identical for the
same feature
Identical for the
same feature
New driver
Partial
compatibility
Partial
compatibility
Partial
compatibility
Partial
compatibility
USB FS
Device
Crypto/hash
processor
RNG
DCMI
USB OTG HS
SYSCFG
Ye s
NAYesNANANA
NAYesNANANA
NAYesNANANA
NAYesNANANA
NAYesNANANA
NANANANA
Doc ID 018608 Rev 313/17
How to migrate across STM32 seriesAN3364
Table 5.STM32 peripheral compatibility analysis F1 versus L1 series
Compatibility
PeripheralF1 series L1 series
CommentsPinoutSW compatibility
No I2S in L1 Medium-density
SPIYe s
Ye s
series
IdenticalFull compatibility
L1 vs. F1: limitation fix
WWDGYe sYesSame featuresNAFull compatibility
IWDG
DBGMCU
CRC
EXTI
USB FS
Device
DMA
TIM
SDIO
Ye sYesSame featuresNAFull compatibility
Ye sYesSame featuresNAFull compatibility
Ye sYesSame featuresNAFull compatibility
Ye sYesSame featuresIdenticalFull compatibility
Ye sYesSame featuresIdenticalFull compatibility
Ye sYesSame featuresNAFull compatibility
Ye sYesSame featuresIdenticalFull compatibility
Ye sYesSame featuresIdenticalFull compatibility
Same features but only
FSMC
Ye sYe s
SRAM/NOR memories are
IdenticalFull compatibility
supported
PWRYe sYe s +EnhancementNA
RCC
Ye sYe s +EnhancementNAPartial compatibility
Full compatibility for the
same feature
Limitation fix / One Sample
USART
I2C
DAC
ADC
RTCYe sYe s + +New peripheral
Ye sYe s +
Bit method / Oversampling by 8IdenticalFull compatibility
Ye sYe s +Limitation fixIdenticalFull compatibility
Ye sYe s +DMA underrun interruptIdenticalFull compatibility
Ye sYe s + +New peripheralIdenticalPartial compatibility
Identical for the
same feature
Not compatible
FLASHYe sYe s + +New peripheralNANot compatible
GPIO
CAN
CEC
Ye sYe s + +New peripheralIdenticalNot compatible
Ye sNANANANA
Ye sNANANANA
Ethernet
Ye sNANANANA
14/17Doc ID 018608 Rev 3
AN3364How to migrate across STM32 series
Color key:
= New feature or new architecture (Yes++)
= Same feature, but specification change or enhancement (Yes+)
= Feature not available (NA)
Table 5.STM32 peripheral compatibility analysis F1 versus L1 series (continued)
Compatibility
PeripheralF1 series L1 series
CommentsPinoutSW compatibility
LCD glassNAYesNANANA
COMPNAYes
SYSCFGNAYesNANANA
AESNAYes
OPAMPNAYesNANANA
NANANA
NANANA
1.2 Software migration
Each STM32 series is supported by a complete range of high-end and low-cost evaluation,
software, debugging and programming tools.
This complete line includes third-party solutions that come complete with an integrated
development environment and in-circuit debugger/programmer featuring a JTAG and/or SW
application interface. Developers who are new to this series and the Cortex™ core can also
benefit from the range of starter kits that are specially designed to help developers evaluate
device features and start their own applications.
Thanks to ST firmware libraries and a comprehensive set of application notes, STM32
microcontrollers offera complete software interface to reduce the time to market and keep
the user code independent from hardware details. The state-of-the-art and highly efficient
library of software drivers combined with extensive support for all major tool providers offers
a fast route to best-fit and an optimized development process.
Doc ID 018608 Rev 315/17
Revision historyAN3364
2 Revision history
Table 6.Document revision history
DateRevisionChanges
20-Jul-20111Initial release
01-Mar-20122Added medium+ and high-density STM32L1 devices
30-May-20123Added STM32F0 and STM32F4 devices
16/17Doc ID 018608 Rev 3
AN3364
Please Read Carefully:
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the
right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any
time, without notice.
All ST products are sold pursuant to ST’s terms and conditions of sale.
Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no
liability whatsoever relating to the choice, selection or use of the ST products and services described herein.
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this
document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products
or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such
third party products or services or any intellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED
WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS
OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS EXPRESSLY APPROVED IN WRITING BY TWO AUTHORIZED ST REPRESENTATIVES, ST PRODUCTS ARE NOT
RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING
APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY,
DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE
GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void
any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any
liability of ST.
ST and the ST logo are trademarks or registered trademarks of ST in various countries.
Information in this document supersedes and replaces all information previously supplied.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.