Skip to content

Commit bc07843

Browse files
parthitcenashif
authored andcommitted
boards: ti/mspm0: add support for L2228 launchpad
MSPM0L2228 launchpad provides evaluation and development platform with 32KB SRAM and 256KB Flash. This board also comes with 32Mhz external high frequency crystal and 32.768Khz low frequency crystal. Also LCD (only with L2228 SoC's) is included with many multi-function PIO's exposed. Add support with basic UART and LED functions. Signed-off-by: Parthiban Nallathambi <[email protected]>
1 parent de61a9e commit bc07843

File tree

9 files changed

+270
-0
lines changed

9 files changed

+270
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2024 Texas Instruments
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_LP_MSPM0L2228
5+
select SOC_MSPM0L2228

boards/ti/lp_mspm0l2228/board.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# # SPDX-License-Identifier: Apache-2.0
2+
3+
board_runner_args(jlink "--device=MSPM0L2228" "--speed=4000")
4+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
5+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/ti/lp_mspm0l2228/board.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
board:
2+
name: lp_mspm0l2228
3+
full_name: MSPM0L2228 Launchpad
4+
vendor: ti
5+
socs:
6+
- name: mspm0l2228
87.3 KB
Loading

boards/ti/lp_mspm0l2228/doc/index.rst

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
.. zephyr:board:: lp_mspm0l2228
2+
3+
Overview
4+
********
5+
6+
MSPM0Lx22x microcontrollers (MCUs) are part of the highly integrated, ultra-low-power 32-bit MSPM0 MCU
7+
family based on the Arm® Cortex®-M0+ 32-bit core platform, operating at up to 32MHz frequency. These
8+
MCUs offer a blend of cost optimization and design flexibility for applications requiring 128KB to 256KB of
9+
flash memory in small packages (down to 4mm x 4mm) or high pin count packages (up to 80 pins). These
10+
devices include a VBAT backup island, an optional segmented LCD controller (on MSPM0L222x), cybersecurity
11+
enablers, and high-performance integrated analog, and provide excellent low-power performance across the
12+
operating temperature range.
13+
14+
Up to 256KB of embedded flash program memory with built-in error correction code (ECC) and up to 32KB
15+
SRAM with ECC and parity protection is provided. The flash memory is organized into two main banks to support
16+
field firmware updates, with address swap support provided between the two main banks. An additional 32-byte
17+
backup memory is provided in the VBAT island, supplied by the VBAT pin and retained even when the main
18+
supply (VDD) is lost.
19+
20+
Hardware
21+
********
22+
23+
Launchpad MSPM0L2228 provides the following hardware components:
24+
25+
- MSPM0L2228TPN SoC
26+
- ARM |reg| 32-bit Cortex |reg|-M0+ CPU
27+
- 32 MHz max CPU frequency
28+
- VDD from 1.62 V to 3.6 V
29+
- 256 KB Flash
30+
- 32 KB SRAM with ECC or parity
31+
- GPIO with external interrupt capability
32+
- 12-bit ADC with 26 channels
33+
- RTC
34+
- Six timers supporting up to 18 PWM outputs
35+
- Watchdog Timers (2)
36+
- UART (5)
37+
- I2C (2)
38+
- SPI (2)
39+
- DMA Controller
40+
41+
.. image:: img/LP-MSPM0L2228.png
42+
:align: center
43+
:alt: MSPM0L2228 LaunchPad development board
44+
45+
Zephyr uses the ``lp_mspm0l2228`` board for building LP_MSPM0L2228
46+
47+
Features:
48+
*********
49+
50+
- Onboard XDS110 debug probe
51+
- EnergyTrace technology available for ultra-low-power debugging
52+
- 2 buttons, 1 LED and 1 RGB LED for user interaction
53+
- Temperature sensor circuit
54+
- Light sensor circuit
55+
- External OPA2365 (default buffer mode) for ADC (up to 4 Msps) evaluation
56+
- Onboard 32.768-kHz and 40-MHz crystals
57+
- RC filter for ADC input (unpopulated by default)
58+
59+
Details on the MSPM0L2228 LaunchPad can be found on the `TI LP_MSPM0L2228 Product Page`_.
60+
61+
Supported Features
62+
==================
63+
64+
.. zephyr:board-supported-hw::
65+
66+
Building and Flashing
67+
*********************
68+
69+
Building
70+
========
71+
72+
Follow the :ref:`getting_started` instructions for Zephyr application development.
73+
74+
For example, to build the blinky application for the MSPM0L2228 LaunchPad:
75+
76+
.. zephyr-app-commands::
77+
:zephyr-app: samples/hello_world
78+
:board: lp_mspm0l2228
79+
:goals: build
80+
81+
The resulting ``zephyr.bin`` binary in the build directory can be flashed onto
82+
MSPM0L2228 LaunchPad using the steps mentioned below.
83+
84+
Flashing
85+
========
86+
87+
Open OCD is used to program the flash memory on the devices. It may be necessary in
88+
earlier versions to use a branch of open OCD onto the device.
89+
90+
Before OpenOCD is public, one can clone `This Repo <https://github.com/openocd-org/openocd.git>`_,
91+
and then this can be built with
92+
93+
.. code-block:: console
94+
95+
$ cd <cloned_OPENOCD_dir>
96+
$ ./bootstrap (when building from the git repository)
97+
$ ./configure
98+
$ make
99+
$ sudo make install
100+
101+
Then after the build, it is possible to flash the device by passing additional arguments to the flash command
102+
103+
.. code-block:: console
104+
105+
$ west flash --openocd <path to cloned dir>/src/openocd --openocd-search <path to cloned dir>/tcl
106+
107+
Flashing using JLINK
108+
109+
.. code-block:: console
110+
111+
$ west flash --runner jlink
112+
113+
Debugging
114+
=========
115+
116+
You can debug an application in the usual way. Here is an example for the
117+
:zephyr:code-sample:`hello_world` application.
118+
119+
.. zephyr-app-commands::
120+
:zephyr-app: samples/hello_world
121+
:board: lp_mspm0l2228
122+
:goals: debug
123+
124+
References
125+
**********
126+
127+
TI MSPM0 MCU Page:
128+
https://www.ti.com/microcontrollers-mcus-processors/arm-based-microcontrollers/arm-cortex-m0-mcus/overview.html
129+
130+
TI MSPM0L2228 Product Page:
131+
https://www.ti.com/product/MSPM0L2228
132+
133+
TI MSPM0 SDK:
134+
https://www.ti.com/tool/MSPM0-SDK
135+
136+
.. _MSPM0L2228 TRM:
137+
https://www.ti.com/lit/slau847
138+
139+
.. _TI LP_MSPM0L2228 Product Page:
140+
https://www.ti.com/tool/LP-MSPM0L2228
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/*
2+
* Copyright (c) 2025 Texas Instruments
3+
* Copyright (c) 2025 Linumiz GmbH
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
/dts-v1/;
9+
10+
#include <ti/mspm0/l/mspm0l2228.dtsi>
11+
#include <ti/mspm0/l/mspm0l222x-pinctrl.dtsi>
12+
#include <zephyr/dt-bindings/clock/mspm0_clock.h>
13+
#include <zephyr/dt-bindings/gpio/gpio.h>
14+
15+
/ {
16+
model = "TI LP_MSPM0L2228/MSPM0L2228";
17+
compatible = "ti,mspm0l2228";
18+
19+
aliases {
20+
led0 = &led0;
21+
led1 = &led1;
22+
};
23+
24+
chosen {
25+
zephyr,sram = &sram0;
26+
zephyr,flash = &flash0;
27+
zephyr,console = &uart0;
28+
zephyr,shell-uart = &uart0;
29+
zephyr,code-partition = &slot0_partition;
30+
};
31+
32+
leds {
33+
compatible = "gpio-leds";
34+
35+
led0: led_0 {
36+
gpios = <&gpiob 10 GPIO_ACTIVE_HIGH>;
37+
label = "RED LED";
38+
};
39+
40+
led1: led_1 {
41+
gpios = <&gpiob 9 GPIO_ACTIVE_HIGH>;
42+
label = "Green LED";
43+
};
44+
};
45+
};
46+
47+
&flash0 {
48+
status = "okay";
49+
50+
partitions {
51+
compatible = "fixed-partitions";
52+
#address-cells = <1>;
53+
#size-cells = <1>;
54+
55+
boot_partition: partition@0 {
56+
label = "mcuboot";
57+
reg = <0x00000000 0x8000>;
58+
};
59+
60+
slot0_partition: partition@8000 {
61+
label = "image-0";
62+
reg = <0x00008000 0x1c000>;
63+
};
64+
65+
slot1_partition: partition@24000 {
66+
label = "image-1";
67+
reg = <0x00024000 0x1c000>;
68+
};
69+
};
70+
};
71+
72+
&pinctrl {
73+
status = "okay";
74+
};
75+
76+
&gpiob {
77+
status = "okay";
78+
};
79+
80+
&uart0 {
81+
status = "okay";
82+
current-speed = <115200>;
83+
pinctrl-0 = <&uart0_tx_pa10 &uart0_rx_pa11>;
84+
pinctrl-names = "default";
85+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
identifier: lp_mspm0l2228
2+
name: TI MSPM0L2228 Launchpad
3+
type: mcu
4+
arch: arm
5+
toolchain:
6+
- zephyr
7+
- gnuarmemb
8+
- xtools
9+
ram: 32
10+
flash: 256
11+
supported:
12+
- gpio
13+
- pinctrl
14+
- uart
15+
vendor: ti
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
# Enable UART driver
4+
CONFIG_SERIAL=y
5+
6+
# Enable console
7+
CONFIG_CONSOLE=y
8+
CONFIG_UART_CONSOLE=y
9+
10+
CONFIG_CLOCK_CONTROL=y
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source [find interface/xds110.cfg]
2+
adapter speed 10000
3+
4+
source [find target/ti_mspm0.cfg]

0 commit comments

Comments
 (0)