
MSP430F12x(2) to MSP430F21x2 Migration – Firmware Considerations
www.ti.com
3 MSP430F12x(2) to MSP430F21x2 Migration – Firmware Considerations
This section outlines important steps to consider when transitioning existing software routines or an entire
application to an MSP430F21x2 device. Even though the MSP430F12x(2) and the MSP430F21x2 are
code compatible and share many of the same peripherals, in many cases, migration is not as simple as
programming the MSP430F12x(2) binary image into an MSP430F21x2 device. In general, an application
should be rebuilt at a source-code level (including all referenced code libraries, etc.), using the appropriate
MSP430F21x2 device support files, such as the header file (msp430x21x2.h) and the respective linker
command file (e.g., lnk_msp430f2132.cmd for TI Code Composer Studio IDE or lnk430F2132.xcl for IAR
Embedded Workbench). Doing this is the first step toward a successful migration to an MSP430F21x2.
The following sections provide more details regarding certain key aspects that should be considered.
3.1 Memory Considerations
3.1.1 Device Memory Map
The memory maps of the MSP430F12x(2) and MSP430F21x2 are almost identical. This applies to the
location and size of RAM as well as flash memory, allowing an application to keep the same linker
command file during migration, in most cases. However, there are two exceptions that apply and,
therefore, it is strongly recommended to rebuild the application to accommodate for the difference in the
memory map. The build process makes use of the memory map information stored in the IDE linker
command file and automatically accommodates these changes. The linker command files are found within
the folder where the IDE was installed and have the file name extension CMD (for TI Code Composer
Studio) and XCL (for IAR Embedded Workbench).
The interrupt vector table of MSP430F21x2 devices spans 32 memory word locations, whereas the table
in MSP430F12x(2) devices spans 16 memory word locations. Furthermore, the word memory location
0xFFDE on MSP430F21x2 devices is reserved for special bootstrap loader purposes (BSLSKEY). See
Section 3.5 for more details regarding the interrupt vector table.
Both MSP430F2122 and MSP430F2132 devices have an increased RAM size of 512 bytes compared to
their MSP430F12x(2) family counterparts. The application should be rebuilt to take advantage of this
increased memory size. In addition, the MSP430F21x2 device family has a device with a memory
configuration previously unavailable. The MSP430F2112 has 256 bytes of RAM and 2 KB of flash
memory. This device can be considered as an alternative migration option for applications that don't use
the entire flash memory of the original device.
Further details regarding the device memory maps can be found in the device-specific data sheets.
[3][4][5]
3.1.2 Information Flash Memory
Both MSP430F12x(2) and MSP430F21x2 have 256 bytes of information flash memory located in the
memory range of 0x1000 to 0x10FF. While the total memory size is the same, the memory is organized
differently. The MSP430F12x(2) device information memory consists of two flash segments (INFOA and
INFOB) that are 128 bytes each, whereas the MSP430F21x2 has four segments (INFOA, INFOB, INFOC,
and INFOD) that are 64 bytes each.
Applications storing data in the information memory need to consider the different segment sizes. Each
information flash memory segment must be erased individually, resulting in four write accesses on an
MSP430F21x2 instead of two on the MSP430F12x(2). Also, note that the MSP430F21x2 INFOA segment
is protected by a lock feature and requires special treatment to be erased or written to. However, in
general, it is not recommended to erase INFOA or store any user data in it. INFOA comes with
factory-provided device-specific calibration data organized in a tag-length-value (TLV) structure, such as to
generate specific frequencies using the DCO or to calibrate the ADC10. Chances are that an application
can benefit from those constants.
See the MSP430x2xx Family User’s Guide [2] for more details on the organization of the 2xx information
flash memory, the TLV structure, and the INFOA lock feature.
4Migrating From MSP430F12x(2) to MSP430F21x2 SLAA421–October 2009
Submit Documentation Feedback
Copyright © 2009, Texas Instruments Incorporated