Skip to content

Commit 979c943

Browse files
committed
boards: add lp_mspm0g3507
Added TI LP_MSPM0G3507 board for MSPM0 Family Signed-off-by: Jackson Farley <[email protected]>
1 parent 62396ed commit 979c943

File tree

9 files changed

+262
-0
lines changed

9 files changed

+262
-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_MSPM0G3507
5+
select SOC_MSPM0G350X
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+
board_runner_args(openocd "--cmd-pre-load=reset init")
4+
# unprotect sectors before running
5+
board_runner_args(openocd "--cmd-pre-load=flash protect 1 0 last off")
6+
board_runner_args(openocd "--cmd-pre-load=flash erase_sector 1 0 last")
7+
8+
#board_runner_args(openocd "--cmd-reset-halt=flash info 1")
9+
10+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)

boards/ti/lp_mspm0g3507/board.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
board:
2+
name: lp_mspm0g3507
3+
vendor: ti
4+
socs:
5+
- name: mspm0g350x
94.7 KB
Loading
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
.. _lp_mspm0g3507:
2+
3+
MSPM0G3507 LaunchPad
4+
########################
5+
6+
Overview
7+
********
8+
9+
MSPM0G350x microcontrollers (MCUs) are part of the MSP highly integrated, ultra-low-power 32-bit MCU
10+
family based on the enhanced Arm® Cortex®-M0+ 32-bit core platform operating at up to 80-MHz frequency.
11+
These cost-optimized MCUs offer high-performance analog peripheral integration, support extended temperature
12+
ranges from -40°C to 125°C, and operate with supply voltages ranging from 1.62 V to 3.6 V.
13+
The MSPM0G350x devices provide up to 128KB embedded flash program memory with built-in error correction
14+
code (ECC) and up to 32KB SRAM with ECC and hardware parity option. These MCUs also incorporate a
15+
memory protection unit, 7-channel DMA, math accelerator, and a variety of high-performance analog peripherals
16+
such as two 12-bit 4-Msps ADCs, configurable internal shared voltage reference, one 12-bit 1-Msps DAC, three
17+
high speed comparators with built-in reference DACs, two zero-drift zero-crossover op-amps with programmable
18+
gain, and one general-purpose amplifier. These devices also offer intelligent digital peripherals such as two
19+
16-bit advanced control timers, five general-purpose timers (with one 16-bit general-purpose timer for QEI
20+
interface, two 16-bit general-purpose timers for STANDBY mode, and one 32-bit general-purpose timer), two
21+
windowed-watchdog timers, and one RTC with alarm and calendar modes. These devices provide data integrity
22+
and encryption peripherals (AES, CRC, TRNG) and enhanced communication interfaces (four UART, two I2C,
23+
two SPI, CAN 2.0/FD).
24+
25+
.. figure:: img/lp_mspm0g3507.png
26+
:align: center
27+
:alt: MSPM0G3507 LaunchPad development board
28+
29+
Features:
30+
=========
31+
32+
- Onboard XDS110 debug probe
33+
- EnergyTrace technology available for ultra-low-power debugging
34+
- 2 buttons, 1 LED and 1 RGB LED for user interaction
35+
- Temperature sensor circuit
36+
- Light sensor circuit
37+
- External OPA2365 (default buffer mode) for ADC (up to 4 Msps) evaluation
38+
- Onboard 32.768-kHz and 40-MHz crystals
39+
- RC filter for ADC input (unpopulated by default)
40+
41+
Details on the MSPM0G3507 LaunchPad can be found on the `TI LP_MSPM0G3507 Product Page`_.
42+
43+
Supported Features
44+
==================
45+
46+
The MSPM0G3507 LaunchPad development board configuration supports the following hardware features:
47+
48+
+-----------+------------+-----------------------+
49+
| Interface | Controller | Driver/Component |
50+
+===========+============+=======================+
51+
| NVIC | on-chip | nested vectored |
52+
| | | interrupt controller |
53+
+-----------+------------+-----------------------+
54+
| SYSTICK | on-chip | system clock |
55+
+-----------+------------+-----------------------+
56+
| UART | on-chip | serial |
57+
+-----------+------------+-----------------------+
58+
| GPIO | on-chip | gpio |
59+
+-----------+------------+-----------------------+
60+
| PINMUX | on-chip | pinctrl |
61+
+-----------+------------+-----------------------+
62+
63+
More details about the supported peripherals are available in `MSPM0G3507 TRM`_.
64+
Other hardware features are not currently supported by the Zephyr kernel.
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 :ref:`hello_world` application for the MSPM0G3507 LaunchPad:
75+
76+
.. zephyr-app-commands::
77+
:zephyr-app: samples/hello_world
78+
:board: lp_mspm0g3507
79+
:goals: build
80+
81+
The resulting ``zephyr.bin`` binary in the build directory can be flashed onto
82+
MSPM0G3507 LaunchPad using the steps mentioned below.
83+
84+
Flashing
85+
========
86+
87+
`UniFlash`_ is used to program the flash memory. Only bin loading is currently supported.
88+
Make sure to select the checkbox for binary loading.
89+
90+
Debugging
91+
=========
92+
93+
The flashing method described above does not include symbols. Thus, debugging requires an additional step to load the symbols.
94+
This section shows how to debug the MSPM0G3507 LaunchPad board using `CCS IDE`_. More information
95+
on debugging using CCS can be found in `CCS User's Guide`_.
96+
97+
In general, the steps for debugging in CCS are:
98+
99+
1. Open CCS
100+
2. Go to Window > Show View > Target Configruation
101+
3. Import target confguration by right clicking User Defined, selecting Import target configuration and pointing to the lp_mspm0g3507/support/MSPM0G3507.ccxml
102+
4. Launch target configuration by right clicking the new MSPM0G3507.ccxml file and clicking Launch target configuration
103+
5. Plug in the device and connect to it by going to Run > Connect Target
104+
6. Go to Run > Load > Load Symbols and load in the zephyr.elf file loaded
105+
7. Use CCS to debug
106+
107+
References
108+
**********
109+
110+
TI MSPM0 MCU Page:
111+
https://www.ti.com/microcontrollers-mcus-processors/arm-based-microcontrollers/arm-cortex-m0-mcus/overview.html
112+
113+
TI MSPM0G3507 Product Page:
114+
https://www.ti.com/product/MSPM0G3507
115+
116+
TI MSPM0 SDK:
117+
https://www.ti.com/tool/MSPM0-SDK
118+
119+
.. _CCS User's Guide:
120+
https://software-dl.ti.com/ccs/esd/documents/users_guide/index.html
121+
122+
.. _MSPM0G3507 TRM:
123+
https://www.ti.com/lit/slau846
124+
125+
.. _TI LP_MSPM0G3507 Product Page:
126+
https://www.ti.com/tool/LP-MSPM0G3507
127+
128+
.. _UniFlash:
129+
http://processors.wiki.ti.com/index.php/UniFlash_v4_Quick_Guide#Command_Line_Interface
130+
131+
.. _CCS IDE:
132+
http://www.ti.com/tool/ccstudio
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/* SPDX-License-Identifier: Apache-2.0 */
2+
3+
/dts-v1/;
4+
5+
#include <ti/mspm0g1x0x_g3x0x/mspm0g3507.dtsi>
6+
#include <ti/mspm0g1x0x_g3x0x/mspm0g350x-pinctrl.dtsi>
7+
#include <zephyr/dt-bindings/input/input-event-codes.h>
8+
9+
/ {
10+
model = "TI LP_MSPM0G3507";
11+
compatible = "ti,mspm0g3507";
12+
13+
aliases {
14+
led0 = &led0;
15+
led1 = &led1;
16+
sw0 = &btn0;
17+
sw1 = &btn1;
18+
};
19+
20+
chosen {
21+
zephyr,sram = &sram0;
22+
zephyr,flash = &flash0;
23+
zephyr,console = &uart0;
24+
zephyr,shell-uart = &uart0;
25+
};
26+
27+
leds {
28+
compatible = "gpio-leds";
29+
led0: led_0 {
30+
gpios = <&gpiob 22 GPIO_ACTIVE_HIGH>;
31+
label = "Blue LED";
32+
};
33+
led1: led_1 {
34+
gpios = <&gpiob 26 GPIO_ACTIVE_HIGH>;
35+
label = "Red LED";
36+
};
37+
led2: led_2 {
38+
gpios = <&gpiob 27 GPIO_ACTIVE_HIGH>;
39+
label = "Green LED";
40+
};
41+
};
42+
43+
keys {
44+
compatible = "gpio-keys";
45+
btn0: btn_0 {
46+
gpios = <&gpiob 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
47+
label = "Switch 3";
48+
zephyr,code = <INPUT_KEY_0>;
49+
};
50+
btn1: btn_1 {
51+
gpios = <&gpioa 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
52+
label = "Switch 2";
53+
zephyr,code = <INPUT_KEY_1>;
54+
};
55+
};
56+
};
57+
58+
&cpu0 {
59+
clock-frequency = <32000000>;
60+
};
61+
62+
&gpioa {
63+
status = "okay";
64+
};
65+
66+
&gpiob {
67+
status = "okay";
68+
};
69+
70+
&uart0 {
71+
status = "okay";
72+
current-speed = <115200>;
73+
pinctrl-0 = <&uart0_tx_pa10 &uart0_rx_pa11>;
74+
pinctrl-names = "default";
75+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
identifier: lp_mspm0g3507
2+
name: LP_MSPM0G3507
3+
type: mcu
4+
arch: arm
5+
toolchain:
6+
- zephyr
7+
- gnuarmemb
8+
- xtools
9+
ram: 32
10+
flash: 128
11+
supported:
12+
- gpio
13+
- pinctrl
14+
- uart
15+
vendor: ti
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
CONFIG_CORTEX_M_SYSTICK=y
4+
5+
# Enable gpio driver
6+
CONFIG_GPIO=y
7+
8+
# Enable uart driver
9+
CONFIG_SERIAL=y
10+
11+
# Enable console
12+
CONFIG_CONSOLE=y
13+
CONFIG_UART_CONSOLE=y
14+
15+
# Enable pinctrl
16+
CONFIG_PINCTRL=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)