TN1201

TN1201
Technical note
Migrating from STM32L15/6xxD to STM32L15/6xVD-X
Introduction
To ease the development of STM32 microcontroller applications, it is important to be able to
smoothly replace one microcontroller type with another from the same product family. The
purpose of this technical note is to help users with the migration from an STM32L15/6xxD
(348KB Flash and 48KB RAM) device to an STM32L15/6xVD-X (384KB Flash and 80KB
RAM) device. This document includes the relevant information for users.
Prior to migrating an application, the users need to analyze the hardware migration, the
peripheral migration and the firmware migration. To better understand the information
included in this technical note, the users should be familiar with the STM32L1
microcontroller family.
For additional information, please refer to the STM32L100xx, STM32L151xx, STM32L152xx
and STM32L162xx advanced ARM®-based 32-bit MCUs reference manual RM0038 in
which STM32L15/6xxD is ‘Cat.4’ device, STM32L15/6xVD-X is ‘Cat.5’ device, and to the
STM32L15/6xxD, STM32L15/6xVD-X datasheets. Documents are available for download
from the company website at www.st.com/stm32.
Table 1 lists the STM32 microcontrollers concerned by this technical note.
Table 1. Applicable products
Type
Microcontrollers
January 2015
Part numbers
STM32L151QD, STM32L151RD, STM32L151VD, STM32L151ZD,
STM32L152QD, STM32L152RD, STM32L152VD, STM32L152ZD,
STM32L162QD, STM32L162RD, STM32L162VD, STM32L162ZD,
STM32L151VD-X, STM32L152VD-X, STM32L162VD-X
DocID027299 Rev 1
1/13
www.st.com
1
Contents
TN1201
Contents
1
Codification/package changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2
Hardware migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3
Peripheral migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1
3.2
Main peripherals/system changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1.1
Memory space increase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1.2
FSMC removal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1.3
SDIO removal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1.4
OPAMP3 removal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Device limitation changes/updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2.1
STM32L15/6xxD specific limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2.2
STM32L15/6xVD-X specific limitations . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4
Development tool adaptations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5
Consumption comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
6
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2/13
DocID027299 Rev 1
TN1201
List of tables
List of tables
Table 1.
Table 2.
Table 3.
Table 4.
Table 5.
Applicable products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
STM32L15/6xxD and STM32L15/6xVD-X codification summary . . . . . . . . . . . . . . . . . . . . . 4
STM32L15/6xxD and STM32L15/6xVD-X device difference summary . . . . . . . . . . . . . . . . 6
Consumption difference summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
DocID027299 Rev 1
3/13
3
Codification/package changes
1
TN1201
Codification/package changes
Table 2 presents the list of references, part numbers and packages for the STM32L15/6xxD
and STM32L15/6xVD-X products.
Table 2. STM32L15/6xxD and STM32L15/6xVD-X codification summary
Reference
products
Device description
Part numbers
STM32L151QD
STM32L151RD
STM32L151VD
STM32L151ZD
STM32L152QD
STM32L152RD
STM32L152VD
STM32L152ZD
STM32L162RD
STM32L162VD
STM32L162ZD
Up to:
STM32L15/6xxD - 384KB Flash 48KB
RAM 12KB EEPROM
STM32L151xD
STM32L152xD
STM32L162xD
Up to:
STM32L15/6xVD-X - 384KB Flash
80KB RAM 16KB EEPROM
STM32L151VD-X,
STM32L15/6xVD-X STM32L152VD-X,
STM32L162VD-X
Packages
LQFP144
LQFP100
LQFP64
UFBGA132
WLCSP64
LQFP100
WLCSP104
The changes and similarities in the codification/packages in STM32L15/6xVD-X versus
STM32L15/6xxD are the following:
4/13
•
the packages are the same except the WLCSP packages,
•
the pinout is the same except for WLCSP packages.
DocID027299 Rev 1
TN1201
2
Hardware migration
Hardware migration
The STM32L15/6xxD and STM32L15/6xVD-X devices are produced in the same packages
and are pin-to-pin compatible except for WLCSP packages. All common peripherals share
the same pins.
The FSMC and SDIO and OPAMP3 peripherals are not present in STM32L15/6xVD-X
devices. In case FSMC or SDIO or the OPAMP3 were used in STM32L15/6xxD and are no
longer needed in the STM32L15/6xVD-X-based new design, some hardware changes are
needed when migrating from STM32L15/6xxD to STM32L15/6xVD-X devices.
In case FSMC or SDIO or OPAMP3 peripheral were not used in STM32L15/6xxD hardware
design, the transition from the STM32L15/6xxD device to the STM32L15/6xVD-X device is
simple. The device can be replaced without any hardware change on the application PCB
(except for WLCSP).
In case of moving from WLCSP64 to WLCSP104 there is of course a hardware redesign
needed.
DocID027299 Rev 1
5/13
12
Peripheral migration
3
TN1201
Peripheral migration
Table 3 lists the main product peripherals and system features for both product sets. The
common peripherals are supported with the dedicated firmware library (from version 1.3.0)
without any modification. Users can change the instance and all the related features (clock
configuration, pin configuration, interrupt/DMA request).
The main peripherals changes are described in Section 3.1: Main peripherals/system
changes. The changes which are also needed in the development tools configuration are
described in Section 4: Development tool adaptations.
Table 3 presents the differences between STM32L15/6xxD and STM32L15/6xVD-X devices
regarding the peripherals and system differences, as well as the impact on the software.
Table 3. STM32L15/6xxD and STM32L15/6xVD-X device difference summary
Function
STM32L15/6xxD
STM32L15/6xVD-X
Behavior / impact to software
ARM® Cortex®-M3
ARM ®Cortex®-M3
-
1.25
1.25
-
Flash [KB]
Dual bank
2 x 192 KB
Dual bank
2 x 192 KB
-
RAM [KB]
48
80
Dual bank
2 x 6 KB
Dual bank
2 x 8 KB
Enhancement. The application can
use larger EEPROM memory space.
Backup registers [B]
128
128
-
Flash interface [bits]
64/32
64/32
-
USART/USB
USART/USB
-
2 / 12ch
2 / 12ch
-
USART/UART
3/2
3/2
-
SPI / I2S
3/2
3/2
-
2
2
-
USB 2.0
1 x FS
1 x FS
-
LCD [seg x com]
8 x 40
8 x 40
-
NO
NO
-
1/6/2
1/6/2
-
1/1
1/1
-
HSI/HSE/LSI/LSE
CSS on HSE/LSE
HSI/HSE/LSI/LSE
CSS on HSE/LSE
-
Core @ 32MHz
Max DMIPS/MHz
EEPROM [KB]
Bootloader
DMA / channels
I2C
LCD rails decoupling
TIMER
[32-bit/16-bit/Lite]
IWDG/WWDG
Clock
6/13
DocID027299 Rev 1
Enhancement. The application can
use larger RAM memory space.
TN1201
Peripheral migration
Table 3. STM32L15/6xxD and STM32L15/6xVD-X device difference summary (continued)
Function
STM32L15/6xxD
STM32L15/6xVD-X
Behavior / impact to software
+/- 1%
+/- 1%
-
RTC V2.0
RTC V2.0
-
2
2
-
1 (40 / 6)
1 (40 / 6)
-
Comparator
2
2
-
Touch sensing
[channels]
34
34
-
Temperature sensor
YES
YES
-
Internal voltage
reference
YES
YES
-
Unique ID
YES
YES
-
MCO
YES
YES
-
HSI/HSI clock trimming
RTC version
DAC
ADC
(total / fast channels)
FSMC
SDIO
Operational amplifier
YES
YES
3
NO
FSMC is not present. Hardware and
software must be adapted in
STM32L15/6xVD-X if FSMC is used
in STM32L15/6xxD.
NO
SDIO is not present. Hardware and
software must be adapted in
STM32L15/6xVD-X if SDIO is used in
STM32L15/6xxD.
2
DocID027299 Rev 1
OPAMP3 is not present. Hardware
and software must be adapted in
STM32L15/6xVD-X if OPAMP3 is
used in STM32L15/6xxD.
7/13
12
Peripheral migration
3.1
TN1201
Main peripherals/system changes
Some system properties and peripherals configuration are changed in the
STM32L15/6xVD-X device. The following sections describe these changes.
3.1.1
Memory space increase
The memory areas are increased in the STM32L15/6xVD-X device as follows:
•
RAM: from 48 KB to 80 KB
•
EEPROM: from 12 KB to 16 KB
The memory increases permit to use STM32L15/6xVD-X device in more complex
applications.
3.1.2
FSMC removal
The flexible static memory controller (FSMC) is not present in the STM32L15/6xVD-X
device. The software and hardware must be adapted when migrating to STM32L15/6xVD-X
device in case the FSMC peripheral is used in the hardware design using the
STM32L15/6xxD device.
3.1.3
SDIO removal
The secure digital input/output interface (SDIO) is not present in the STM32L15/6xVD-X
device. The software and hardware must be adapted when migrating to STM32L15/6xVD-X
device in case the SDIO peripheral is used in the hardware design using the
STM32L15/6xxD device.
3.1.4
OPAMP3 removal
One operational amplifier (OPAMP3) is not present in the STM32L15/6xVD-X device. The
software and hardware must be adapted when migrating to STM32L15/6xVD-X device in
case the OPAMP3 peripheral is used in the hardware design using the STM32L15/6xxD
device.
3.2
Device limitation changes/updates
The errata sheet on STM32L15/6xVD-X devices is available on the company website at
www.st.com. Several limitations that had been reported for the STM32L15/6xxD have been
solved, while other limitations have been introduced. This section describes the changes in
the device limitations.
Please refer to STM32L15/6xxD errata sheet and STM32L15/6xVD-X errata sheet for
details on the device limitations.
3.2.1
STM32L15/6xxD specific limitations
The following limitations that apply to STM32L15/6xxD devices do not apply to
STM32L15/6xVD-X devices:
8/13
•
Missing analog switch on GPIO PC10,
•
Pull-up on PB7 when configured in analog mode,
•
Debugging Stop mode with WFE entry.
DocID027299 Rev 1
TN1201
3.2.2
Peripheral migration
STM32L15/6xVD-X specific limitations
The following limitations which do not concern the STM32L15/6xxD devices have been
introduced for STM32L15/6xVD-X devices:
•
Erase/program operations partially executed if used multi-cycle STRD instruction is
interrupted,
•
Data EEPROM cycling is limited to 100 kcycles instead of 300 kcycles.
DocID027299 Rev 1
9/13
12
Development tool adaptations
4
TN1201
Development tool adaptations
When migrating from STM32L15/6xxD to STM32L15/6xVD-X some changes in the
development tools are necessary. Following the change of device identifier (DEV_ID) and
some peripherals changes with the addition of new features, it has been necessary to
upgrade the development tools as detailed hereafter.
1.
DEV_ID changes:
In STM32L15/6xxD devices, DEV_ID = 0x436
In STM32L15/6xVD-X devices, DEV_ID = 0x437
If the software or programming tool is using DEV_ID[11:0] field (in DBGMCU_IDCODE
register) then the relevant changes must be applied in the software or tool.
2.
Changes in the development tool configurations:
3.
4.
10/13
a)
IAR - install the latest version or apply the patch provided by ST support team to
support the STM32L15/6xVD-X device, and change the device type in the
configuration.
b)
Keil - install the latest version that supports the STM32L15/6xVD-X device,
change the device type in the configuration, and change the ST-LINK
programming algorithm.
c)
Others - install the latest version that supports the STM32L15/6xVD-X device, and
change the device type in the configuration.
STM32L1xx standard peripherals library update:
STM32L15/6xVD-X devices are supported in the latest version of STM32L1xx standard
peripherals library. Make sure to use the latest version of STM32L1xx standard
peripherals library to use the STM32L15/6xVD-X device features.
a)
Define the macro STM32L1XX_XL and use in the project the
startup_stm32l1xx_xl.s file.
b)
Rebuild the existing project with the new library so it can be run on
STM32L15/6xVD-X devices.
Programming tool adaptations:
In the programming tool configurations (for example ST-LINK with the related software)
the device type must be changed to correctly program the new STM32L15/6xVD-X
devices.
Use the latest ST Visual Programmer (STVP) or the latest ST-LINK utility which support
the STM32L15/6xVD-X devices (both are available at www.st.com/stm32).
DocID027299 Rev 1
TN1201
5
Consumption comparison
Consumption comparison
The STM32L15/6xVD-X devices feature less dynamic consumption than the
STM32L15/6xxD devices, due to the advanced manufacturing technology. The power
consumptions in low-power modes are on similar levels.
Table 4 shows the differences in power consumption between the devices in the various
operating modes.
Table 4. Consumption difference summary
Parameters (all at VDD=3V)
STM32L15/6xxD
STM32L15/6xVD-X
Full speed from flash (32 MHz in HSI)
325 µA/MHz
270 µA/MHz
MSI clock from flash (4.2 MHz)
230 µA/MHz
195 µA/MHz
Low-power Run from RAM @ 32 kHz
12.5 µA
11.0 µA
Low-power sleep from RAM @ 32 kHz
6.1 µA
5.5 µA
Stop mode
476 nA
560 nA
Stop mode with RTC on LSI
1.35 µA
1.40 µA
Standby mode
305 nA
290 nA
Standby mode with RTC on LSI
1.16 µA
1.04 µA
DocID027299 Rev 1
11/13
12
Revision history
6
TN1201
Revision history
Table 5. Document revision history
12/13
Date
Revision
09-Jan-2015
1
Changes
Initial release.
DocID027299 Rev 1
TN1201
IMPORTANT NOTICE – PLEASE READ CAREFULLY
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and
improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on
ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order
acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or
the design of Purchasers’ products.
No license, express or implied, to any intellectual property right is granted by ST herein.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. All other product or service names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.
© 2015 STMicroelectronics – All rights reserved
DocID027299 Rev 1
13/13
13