slau966
slau966
User's Guide
Migration Guide From NXP to MSPM0
ABSTRACT
This user's guide assists with migrating from the NXP's Arm® Cortex®-M0+ MCU platform to the Texas
Instruments Arm Cortex-M0+ MSPM0 MCU ecosystem. This guide introduces the MSPM0 development and tool
ecosystem, core architecture, peripheral considerations, and software development kit. The intent is highlight the
differences between the two families and to leverage existing knowledge of the NXP Arm Cortex ecosystem to
quickly ramp with the MSPM0 series of MCUs.
Table of Contents
1 MSPM0 Portfolio Overview.................................................................................................................................................... 2
1.1 Introduction........................................................................................................................................................................ 2
1.2 Portfolio Comparison of NXP M0 MCUs to MSPM0.......................................................................................................... 2
2 Ecosystem and Migration...................................................................................................................................................... 3
2.1 Software Ecosystem Comparison...................................................................................................................................... 3
2.2 Hardware Ecosystem......................................................................................................................................................... 4
2.3 Debug Tools....................................................................................................................................................................... 5
2.4 Migration Process.............................................................................................................................................................. 6
2.5 Migration and Porting Example.......................................................................................................................................... 6
3 Core Architecture Comparison............................................................................................................................................13
3.1 CPU..................................................................................................................................................................................13
3.2 Embedded Memory Comparison..................................................................................................................................... 13
3.3 Power Up and Reset Summary and Comparison............................................................................................................ 15
3.4 Clocks Summary and Comparison...................................................................................................................................17
3.5 MSPM0 Operating Modes Summary and Comparison.................................................................................................... 19
3.6 Interrupt and Events Comparison.................................................................................................................................... 21
3.7 Debug and Programming Comparison.............................................................................................................................23
4 Digital Peripheral Comparison............................................................................................................................................ 25
4.1 General-Purpose I/O (GPIO, IOMUX)..............................................................................................................................25
4.2 Universal Asynchronous Receiver-Transmitter (UART)...................................................................................................25
4.3 Serial Peripheral Interface (SPI)...................................................................................................................................... 26
4.4 I2C....................................................................................................................................................................................27
4.5 Timers (TIMGx, TIMAx)....................................................................................................................................................27
4.6 Windowed Watchdog Timer (WWDT).............................................................................................................................. 28
4.7 Real-Time Clock (RTC).................................................................................................................................................... 28
5 Analog Peripheral Comparison........................................................................................................................................... 29
5.1 Analog-to-Digital Converter (ADC)...................................................................................................................................29
5.2 Comparator (COMP)........................................................................................................................................................ 30
5.3 Digital-to-Analog Converter (DAC)...................................................................................................................................31
5.4 Operational Amplifier (OPA)............................................................................................................................................. 32
5.5 Voltage References (VREF).............................................................................................................................................33
6 References............................................................................................................................................................................ 34
Trademarks
TI E2E™, Code Composer Studio™, LaunchPad™, EnergyTrace™, and BoosterPack™ are trademarks of Texas
Instruments.
Arm® and Cortex® are registered trademarks of Arm Limited (or its subsidiaries) in the US and/or elsewhere.
All trademarks are the property of their respective owners.
Start
Start
One option when porting a project is to try to replace each section of code with equivalent MSPM0 DriverLib
APIs, but this is not generally the easiest path. Generally, it is best to first understand the application code
being ported. Then start with the closest MSPM0 example project and modify it to match the original code
functionality. This process is going to be shown below using a UART terminal example project from the
MCUXpresso SDK_2.x_TWR-KM35Z75M, version 2.16.00.00 SDK. For more complex projects using many
peripherals, this process is typically repeated for each peripheral.
a. Understand the application.
The following description is from the NXP's SDK example "twrkm35z75m_lpuart_interrupt".
The lpuart_functioncal_interrupt example shows how to use lpuart driver functional API to
receive data with interrupt method:
In this example, one lpuart instance connect to PC, the board will send back all characters
that PC send to the board.
The first step is to understand the main settings for the MCU. This is generally clock speeds and power
policies. In this example, the device does not utilize a low power mode. The specified system clock
frequency is 72MHz and is generated from the device's 'OSC' or System oscillator. The UART peripheral
clock is derived from the OSC. It is divided down to allow the UART to operate at 15200 baud, 8 data
bits, 1 start and stop bit, no parity. No hardware flow control is used.
b. Find the closest MSPM0 example.
Next step is to understand any differences between the UART modules for KM35x and MSPM0 and
then find the closest example in the MSPM0 SDK. This is easily accomplished by referring to the
UART section in Section 4. This section highlights differences between the UART modules and links
to the UART-related MSPM0 SDK code examples. The closest example in the SDK for this example is
probably uart_echo_interrupts_standby where the "UART RX/TX echos using interrupts while device is
in STANDBY mode".
This MSPM0 example is similar, but not identical to the being ported. This example simply echoes the
data received back on the device's TX pin. A small adjustment to the C code will allow us to match the
original example.
c. Import and modify the example.
Once a similar example is found, Open CCS and import the code example by going to Project >
Import CCS Projects... and navigate it to the MSPM0 SDK example folder. Import the example. Here is
the uart_echo_interrupts_standby example imported. This is a SysConfig project, so the main C file is
simple. It first calls the SysConfig driverlib initialization which is a function autogenerated by SysConfig
to configures the device. Then, it enables the UART interrupt. Finally, it goes to sleep waiting for any
UART transaction. If it receives a UART transaction, it responds with "Hello World!".
To see the SysConfig configuration, open the .syscfg file, which opens on the SYSCTL tab by default.
For detailed guide on using SysConfig, see the SysConfig Guide in the in the MSPM0 SDK.
This example already has the UART peripheral set up, so there is no need to change any of the
configurations found in this file. If desirable, it is possible to change the settings like the clock source,
clock divider, the target baud rate, or others. For this migration demonstration, the configuration will be
left the same.
This example also utilizes some GPIOs that are not featured in the NXP example. These GPIOs are
simply used for debugging purposes, and one of them drives and LED. These can be left in for the sake
of the demonstration, or removed if this is preferable.
When the project is saved and rebuilt, SysConfig updates the ti_msp_dl_config.c and ti_msp_dl_config.h
files for the example. At this point, the example hardware configuration has been modified to match
the full functionality of the original software being ported. The only remaining effort is application-level
software to check for incoming UART bytes to toggle the LED and respond with "Hello World!". This is
accomplished by editing a small amount of code in the uart_echo_interrupts_standby.c file.
Two changes are made to the application code. First, the message array must be initialized so the
device can respond to UART messages properly. For this, the following line is inserted below the
initialization of gEchoData:
static uint8_t gMessage[12] = {'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', '!'};
The second step actually processes the data send using a for loop and a blocking version of the UART
transmit function, so only one character is sent at a time and there is no data collision in the Tx buffer.
This is accomplished by adding the below code to the UART RX ISR:
The software has successfully been ported! If this was just the first peripheral of many, continue to repeat
this process and use SysConfig to combine each block.
In addition to the Flash memory features listed in the previous table, the MSPM0 Flash memory also has the
following features:
• In-circuit program and erase supported across the entire supply voltage range
• Internal programming voltage generation
• Support for EEPROM emulation with up to 100 000 program/erase cycles on the lower 32KB of the Flash
memory, with up to 10 000 program/erase cycles on the remaining Flash memory (devices with 32KB support
100 000 cycles on the entire Flash memory)
3.2.2 Flash Organization
The Flash memory is used for storing application code and data, the device boot configuration, and parameters
that are preprogrammed by TI from the factory. The Flash memory is organized into one or more banks, and the
memory in each bank is further mapped into one or more logical memory regions and assigned system address
space for use by the application.
3.2.2.1 Memory Banks
Most MSPM0 devices implement a single flash bank (BANK0). On devices with a single flash bank, an ongoing
program/erase operation stalls all read requests to the flash memory until the operation has completed and the
flash controller has released control of the bank. On devices with more than one flash bank, a program/erase
operation on a bank also stalls read requests issued to the bank that is executing the program/erase operation
but does not stall read requests issued to another bank. Therefore, the presence of multiple banks enables
application cases such as:
• Dual-image firmware updates (an application can execute code out of one flash bank while a second image is
programmed to a second symmetrical flash bank without stalling the application execution)
• EEPROM emulation (an application can execute code out of one flash bank while a second flash bank is
used for writing data without stalling the application execution)
3.2.2.2 Flash Memory Regions
The memory within each bank is mapped to one or more logical regions based upon the functions that the
memory in each bank supports. There are four regions:
• FACTORY – Device Id and other parameters
• NONMAIN – Device boot configuration (BCR and BSL)
• MAIN – Application code and data
• DATA – Data or EEPROM emulation
Devices with one bank implement the FACTORY, NONMAIN, and MAIN regions on BANK0 (the only bank
present), and the data region is not available. Devices with multiple banks also implement FACTORY,
NONMAIN, and MAIN regions on BANK0, but include additional banks (BANK1 through BANK4) that can
implement MAIN or DATA regions.
3.2.2.3 NONMAIN Memory
The NONMAIN is a dedicated region of flash memory that stores the configuration data used by the BCR and
BSL to boot the device. The region is not used for any other purpose. The BCR and BSL both have configuration
policies that can be left at their default values (as is typical during development and evaluation) or modified
for specific purposes (as is typical during production programming) by altering the values programmed into the
NONMAIN flash region.
3.3 Power Up and Reset Summary and Comparison
Similar to NXP M0 devices, MSPM0 devices have a minimum operating voltage and have modules in place to
make sure that the device starts up properly by holding the device or portions of the device in a reset state. Table
3-3 shows a comparison on how this is done between the two families and what modules control the power up
process and reset across the families.
Table 3-3. Comparison of Power Up
Feature S32K1xx KEA128x KM35x MSPM0 Devices
Modules Module
PMCU (Power
governing governing
Reset Control Module Reset Control Module Reset Control Module Management and Clock
power up power up
Unit)
and resets and resets
Voltage-Level Based Resets
Complete device reset.
POR POR First level voltage release
Complete device reset. First level voltage release for power up. Lowest voltage
(Power-On (Power-On for power up. Lowest
level for power down
Reset) Reset) voltage level for power
down.
BOR
Configurable Can be configured as
(Brownout
BOR a reset or interrupt,
Reset) with Programmable Threshold for triggering resets
(Brownout with different voltage
configurable
Reset) thresholds.
levels
NXP defines different reset types, while MSPM0 devices have different levels of reset states. For MSPM0
devices, the reset levels have a set order, and when a level is triggered, all subsequent levels are reset until the
device is released into RUN mode. Table 3-4 gives a brief description of MSPM0 reset states. Figure 3-1 shows
the relationship between all of the MSPM0 reset states.
Table 3-4. Comparison of Reset Domains
S32K1xx, KEA128x, KM35 Reset Domains MSPM0 Reset States (1)
Power reset domain Typical triggers are POR, BOR (3) POR existing content
(1) Not all reset triggers are described. Refer to the PMCU chapter of the device TRM for all available reset triggers.
(2) If BOOTRST cause was through NRST or software trigger, RTC, LFCLK, and LFXT/LFLCK_IN configurations and IOMUX settings are
NOT reset to allow RTC to maintain operation through external reset.
(3) For specific reset triggers, see the Reset and Boot chapter of the NXP device-specific TRM.
Cold start
PMU Restart
(PMU and VCORE cycled)
RUN Mode
Software BSL entry (2)
(Application running)
SHUTDOWN request
1. SYSPLLCLK2x is twice the speed of the output of the PLL module and can be divided down.
2. BUSCLK depends on the Power Domain. For Power Domain 0, BUSCLK is ULPCLK. For Power Domain 1,
BUSCLK is MCLK.
The device-specific TRM for each family has a clock tree to help visualize the clock system. Sysconfig can assist
with the options for clock division and sourcing for peripherals.
Table 3-8. Operating Modes Comparison Between NXP and MSPM0 Devices (continued)
S32K1XX Series KEA128x KM35x MSPM0
Mode Description Mode Description Mode Description Mode Description
Standby 0 Lowest power
with BOR
capability; all
PD0
peripherals can
receive
ULPCLK and
LFCLK at
32kHz; RTC
available with
RTCCLK
1 Only TIMG0
and TIMG1 can
receive
ULPCLK or
LFCLK at
32kHz; RTC
available with
RTCCLK
Shutdown No clocks, BOR, or RTC.
Core regulation off. PD1
And PD0 disabled. Exit
triggers reset level BOR.
DL_SYSCTL_setPowerPolicySTANDBY0();
STANDBY0 can be replaced with the operating mode of choice. For a full list of driverlib APIs that govern power
policy, see this section of the MSPM0 SDK DriverLib API guide. Also see the following code examples that
demonstrate entering different operating modes. Similar examples are available for every MSPM0 device.
3.6 Interrupt and Events Comparison
3.6.2 Event Handler and Extended Interrupt and Event Controller (EXTI)
The MSPM0 devices include a dedicated event manager peripheral, which extends the concept of the NVIC
to allow digital events from a peripheral to be transferred to the CPU as interrupts, to the DMA as a trigger,
or to another peripheral to trigger a hardware action. The event manager can also perform handshaking with
the power management and clock unit (PMCU), to make sure that the necessary clock and power domain are
present for triggered event actions to take place.
Peripheral Peripheral, DMA or CPU
Send Event Fabric Receive
GEN_EVENTx CHANID CHANID
IIDX 0 0
MIS Event trigger
IMASK 1 1
REQ REQ to peripheral,
RIS FPUB_x FSUB_x
CLR DMA, or CPU
MIS 15 15
ISET
ICLR
0 0
1 1
ACK ACK
15 15
In the MSPM0 event manager, the peripheral that generates the event is known as a publisher, and the
peripheral, DMA, or CPU that acts based on the publisher is known as the subscriber. The potential
combinations of available publisher and subscriber are extremely flexible and can be used when migrating
software to replace functionality previously handled by interrupt vectors and the CPU, to bypass the CPU
entirely. For example, an I2C-to-UART bridge may previously have triggered a UART transmission upon receipt
of an I2C STOP, using an ISR to set a flag, or load the UART TX buffer directly. With the MSPM0 Event handler,
the I2C transaction complete event could trigger the DMA to load the UART TX buffer directly, and therefore
eliminate the need for any action by the CPU.
To get more details on the use of the event handler in MSPM0, see the Events section of the MSPM0
G-Series 80-MHz Microcontrollers Technical Reference Manual or the MSPM0 L-Series 32-MHz Microcontrollers
Technical Reference Manual.
3.7 Debug and Programming Comparison
The Arm SWD 2-wire JTAG port is the main debug and programming interface for both MSPM0 and NXP .
This interface is typically used during application development, and during production programming. Table 3-10
compares the features between the two device families. For additional information about security features of the
MSPM0 debug interface, see the Cybersecurity Enablers in MSPM0 MCUs.
(1) ADC can be triggered in standby mode, which changes the operating mode.
(2) The number of external input channels varies per device.
(3) The number of ADCs varies per device.
(1) Dual DAC channels are planned for future MSPM0G devices.
For the MSPM0 VREF, you must enable the power bit, PWREN Bit0 (ENABLE).
VREF code examples
Code examples that use VREF can be found in the MSPM0 SDK examples guide.
6 References
• MSPM0 SDK User Guide
• SysConfig Guide for MSPM0
• LP-MSPM0G3507
• LP-MSPM0L1306
• MSPM0C1104
• TMDSEMU110-U
• Texas Instruments: MSPM0G350x Mixed-Signal Microcontrollers With CAN-FD Interface Data Sheet
• Texas Instruments: MSPM0L130x Mixed-Signal Microcontrollers Data Sheet
• Texas Instruments: MSPM0C110x, MSPS003 Mixed-Signal Microcontrollers Data Sheet
• Texas Instruments: MSPM0 G-Series 80MHz Microcontrollers Technical Reference Manual
• Texas Instruments: MSPM0 L-Series 32MHz Microcontrollers Technical Reference Manual
• Texas Instruments: MSPM0 C-Series 24-MHz Microcontrollers Technical Reference Manual
• MSPM0 Driver Library Overview
• Texas Instruments: Cybersecurity Enablers in MSPM0 MCUs
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2025, Texas Instruments Incorporated