Skip to content

Commit dc31254

Browse files
d-philpotkartben
authored andcommitted
boards: Add support for TI MSPM0G3519_LP
Add board files and dts for launchpad. Signed-off-by: Dylan Philpot <[email protected]>
1 parent e1526c9 commit dc31254

File tree

9 files changed

+295
-0
lines changed

9 files changed

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

boards/ti/lp_mspm0g3519/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=MSPM0G3519" "--speed=4000")
4+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
5+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/ti/lp_mspm0g3519/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_mspm0g3519
3+
full_name: MSPM0G3519 Launchpad
4+
vendor: ti
5+
socs:
6+
- name: mspm0g3519
Binary file not shown.

boards/ti/lp_mspm0g3519/doc/index.rst

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
.. zephyr:board:: lp_mspm0g3519
2+
3+
Overview
4+
********
5+
6+
MSPM0Gx51x microcontrollers (MCUs) are part of the MSP highly integrated, ultra-low-power 32-bit MCU
7+
family based on the enhanced Arm® Cortex®-M0+ 32-bit core platform operating at up to 80-MHz frequency.
8+
These cost-optimized MCUs offer high-performance analog peripheral integration, support extended temperature
9+
ranges from -40°C to 125°C, and operate with supply voltages ranging from 1.62 V to 3.6 V.
10+
11+
Hardware
12+
********
13+
14+
The MSPM0Gx51x devices provide up to 512KB embedded flash program memory with built-in error correction
15+
code (ECC) and up to 128KB SRAM with a hardware parity option. These MCUs also incorporate a
16+
memory protection unit, 7-channel DMA, math accelerator, and a variety of peripherals including
17+
18+
* Analog.
19+
20+
* Two 12-bit 4-Msps ADCs.
21+
22+
* Configurable internal shared voltage reference.
23+
24+
* One 12-bit 1-Msps DAC.
25+
26+
* Three high speed comparators with built-in reference DACs.
27+
28+
* Two zero-drift zero-crossover op-amps with programmable gain.
29+
30+
* Digital.
31+
32+
* Two 16-bit advanced control timers.
33+
34+
* Nine general-purpose timers.
35+
36+
* Two 16-bit general-purpose timers for QEI interface.
37+
38+
* Four 16-bit general-purpose timers with low-power operation in STANDBY mode.
39+
40+
* One 32-bit high resolution general-purpose timer.
41+
42+
* Two 16-bit timers with deadband support and up to 12 PWM Channels.
43+
44+
* Two windowed-watchdog timers.
45+
46+
* One RTC with alarm and calendar modes.
47+
48+
* Data Integrity and Encryption.
49+
50+
* One AES HW accelerator capable of CTR, CBC, and ECB modes.
51+
52+
* One Cyclic Redundancy Check (CRC) accelerator.
53+
54+
* One True Random Number Generator (TRNG).
55+
56+
* Communication.
57+
58+
* Seven UARTs, two with support for advanced modes such as LIN and Manchester.
59+
60+
* Three I2C supporting SMBUS/PMBUS and speeds up to FM+ (1Mbits/s).
61+
62+
* Three SPI, one with max speed 32Mbits/s.
63+
64+
* Two CAN interface supporting CAN 2.0 A or B and CAN-FD.
65+
66+
Zephyr uses the ``lp_mspm0g3519`` board for building LP_MSPM0G3519
67+
68+
Features
69+
********
70+
71+
- Onboard XDS110 debug probe
72+
- EnergyTrace technology available for ultra-low-power debugging
73+
- 3 buttons, 1 LED and 1 RGB LED for user interaction
74+
- Temperature sensor circuit
75+
- Light sensor circuit
76+
- External OPA2365 (default buffer mode) for ADC (up to 4 Msps) evaluation
77+
- Onboard 32.768-kHz and 40-MHz crystals
78+
- RC filter for ADC input (unpopulated by default)
79+
80+
Details on the MSPM0G3519 LaunchPad can be found on the `TI LP_MSPM0G3519 Product Page`_.
81+
82+
Supported Features
83+
==================
84+
85+
.. zephyr:board-supported-hw::
86+
87+
Building and Flashing
88+
*********************
89+
90+
Building
91+
========
92+
93+
Follow the :ref:`getting_started` instructions for Zephyr application development.
94+
95+
For example, to build the blinky application for the MSPM0G3519 LaunchPad:
96+
97+
.. zephyr-app-commands::
98+
:zephyr-app: samples/hello_world
99+
:board: lp_mspm0g3519
100+
:goals: build
101+
102+
The resulting ``zephyr.bin`` binary in the build directory can be flashed onto
103+
MSPM0G3519 LaunchPad using the steps mentioned below.
104+
105+
Flashing
106+
========
107+
108+
OpenOCD can be used to program the flash memory on the devices.
109+
110+
.. code-block:: console
111+
112+
$ west flash --openocd <path to cloned dir>/src/openocd --openocd-search <path to cloned dir>/tcl
113+
114+
Flashing can also be done using JLINK.
115+
116+
.. code-block:: console
117+
118+
$ west flash --runner jlink
119+
120+
Debugging
121+
=========
122+
123+
You can debug an application in the usual way. Here is an example for the
124+
:zephyr:code-sample:`hello_world` application.
125+
126+
.. zephyr-app-commands::
127+
:zephyr-app: samples/hello_world
128+
:board: lp_mspm0g3519
129+
:goals: debug
130+
131+
References
132+
**********
133+
134+
- `TI MSPM0 MCU Page`_
135+
- `MSPM0G3519 TRM`_
136+
137+
.. _TI MSPM0 MCU Page:
138+
https://www.ti.com/microcontrollers-mcus-processors/arm-based-microcontrollers/arm-cortex-m0-mcus/overview.html
139+
140+
.. _MSPM0G3519 TRM:
141+
https://www.ti.com/lit/slau846
142+
143+
.. _TI LP_MSPM0G3519 Product Page:
144+
https://www.ti.com/tool/LP-MSPM0G3519
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
/* SPDX-License-Identifier: Apache-2.0 */
2+
3+
/dts-v1/;
4+
5+
#include <ti/mspm0/g/mspm0g3519.dtsi>
6+
#include <ti/mspm0/g/mspm0g1x0x_g3x0x-pinctrl.dtsi>
7+
#include <zephyr/dt-bindings/clock/mspm0_clock.h>
8+
#include <zephyr/dt-bindings/gpio/gpio.h>
9+
#include <zephyr/dt-bindings/input/input-event-codes.h>
10+
11+
/ {
12+
model = "TI LP_MSPM0G3519";
13+
compatible = "ti,mspm0g3519";
14+
15+
aliases {
16+
led0 = &led0;
17+
led1 = &led1;
18+
led2 = &led2;
19+
sw0 = &btn0;
20+
sw1 = &btn1;
21+
};
22+
23+
chosen {
24+
zephyr,sram = &sram0;
25+
zephyr,flash = &flash0;
26+
zephyr,console = &uart0;
27+
zephyr,shell-uart = &uart0;
28+
};
29+
30+
leds {
31+
compatible = "gpio-leds";
32+
33+
led0: led_0 {
34+
gpios = <&gpiob 22 GPIO_ACTIVE_HIGH>;
35+
label = "Blue LED";
36+
};
37+
38+
led1: led_1 {
39+
gpios = <&gpiob 26 GPIO_ACTIVE_HIGH>;
40+
label = "Red LED";
41+
};
42+
43+
led2: led_2 {
44+
gpios = <&gpiob 27 GPIO_ACTIVE_HIGH>;
45+
label = "Green LED";
46+
};
47+
};
48+
49+
keys {
50+
compatible = "gpio-keys";
51+
52+
btn0: btn_0 {
53+
gpios = <&gpioa 18 (GPIO_ACTIVE_HIGH)>;
54+
label = "Switch 1";
55+
zephyr,code = <INPUT_KEY_0>;
56+
};
57+
58+
btn1: btn_1 {
59+
gpios = <&gpiob 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
60+
label = "Switch 2";
61+
zephyr,code = <INPUT_KEY_1>;
62+
};
63+
};
64+
};
65+
66+
&cpu0 {
67+
clock-frequency = <DT_FREQ_M(80)>;
68+
};
69+
70+
&ulpclk {
71+
clock-frequency = <DT_FREQ_M(40)>;
72+
clk-div = <2>;
73+
};
74+
75+
&mclk {
76+
clock-frequency = <DT_FREQ_M(80)>;
77+
clocks = <&hsclk 0>;
78+
};
79+
80+
&hsclk {
81+
clocks = <&syspll2x 0>;
82+
status = "okay";
83+
};
84+
85+
&syspll2x {
86+
status = "okay";
87+
};
88+
89+
&pinctrl {
90+
status = "okay";
91+
};
92+
93+
&gpioa {
94+
status = "okay";
95+
};
96+
97+
&gpiob {
98+
status = "okay";
99+
};
100+
101+
&uart0 {
102+
status = "okay";
103+
104+
current-speed = <115200>;
105+
pinctrl-0 = <&uart0_tx_pa10 &uart0_rx_pa11>;
106+
pinctrl-names = "default";
107+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
identifier: lp_mspm0g3519
2+
name: TI MSPM0G3519 Launchpad
3+
type: mcu
4+
arch: arm
5+
toolchain:
6+
- zephyr
7+
- gnuarmemb
8+
- xtools
9+
ram: 128
10+
flash: 512
11+
supported:
12+
- uart
13+
- gpio
14+
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)