Skip to content

Commit d0c9952

Browse files
committed
boards: added TI LP_MSPM0G3507 board
added Texas Instruments LP_MSPM0G3507 launchpad Signed-off-by: Jackson Farley <[email protected]>
1 parent 8d0d1fa commit d0c9952

File tree

9 files changed

+327
-0
lines changed

9 files changed

+327
-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_MSPM0G3507
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
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: mspm0g3507
43 KB
Loading
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
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+
14+
The MSPM0G350x devices provide up to 128KB embedded flash program memory with built-in error correction
15+
code (ECC) and up to 32KB 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+
* Analog.
18+
19+
* Two 12-bit 4-Msps ADCs.
20+
21+
* Configurable internal shared voltage reference.
22+
23+
* One 12-bit 1-Msps DAC.
24+
25+
* Three high speed comparators with built-in reference DACs.
26+
27+
* Two zero-drift zero-crossover op-amps with programmable gain.
28+
29+
* Digital.
30+
31+
* Two 16-bit advanced control timers.
32+
33+
* Five general-purpose timers.
34+
35+
* One 16-bit general-purpose timer for QEI interface.
36+
37+
* One 32-bit high resolution general-purpose timer.
38+
39+
* Two 16-bit timers with deadband support and up to 12 PWM Channels.
40+
41+
* Two windowed-watchdog timers.
42+
43+
* One RTC with alarm and calendar modes.
44+
45+
* Data Integrity and Encryption.
46+
47+
* One AES HW accelerator capable of CTR, CBC, and ECB modes.
48+
49+
* One Cyclic Redundancy Check (CRC) accelerator.
50+
51+
* One True Random Number Generator (TRNG).
52+
53+
* Communication.
54+
55+
* Four UARTs, one with support for advanced modes such as LIN and Manchester.
56+
57+
* Two I2C supporting SMBUS/PMBUS and speeds up to FM+ (1Mbits/s).
58+
59+
* Two SPI, one with max speed 32Mbits/s.
60+
61+
* One CAN interface supporting CAN 2.0 A or B and CAN-FD.
62+
63+
.. figure:: img/lp_mspm0g3507.webp
64+
:align: center
65+
:alt: MSPM0G3507 LaunchPad development board
66+
67+
Zephyr uses the ``lp_mspm0g3507`` board configuration for building
68+
the LP_MSPM0G3507
69+
70+
Features:
71+
=========
72+
73+
- Onboard XDS110 debug probe
74+
- EnergyTrace technology available for ultra-low-power debugging
75+
- 2 buttons, 1 LED and 1 RGB LED for user interaction
76+
- Temperature sensor circuit
77+
- Light sensor circuit
78+
- External OPA2365 (default buffer mode) for ADC (up to 4 Msps) evaluation
79+
- Onboard 32.768-kHz and 40-MHz crystals
80+
- RC filter for ADC input (unpopulated by default)
81+
82+
Details on the MSPM0G3507 LaunchPad can be found on the `TI LP_MSPM0G3507 Product Page`_.
83+
84+
Supported Features
85+
==================
86+
87+
The MSPM0G3507 LaunchPad development board configuration supports the following hardware features:
88+
89+
+-----------+------------+-----------------------+
90+
| Interface | Controller | Driver/Component |
91+
+===========+============+=======================+
92+
| NVIC | on-chip | nested vectored |
93+
| | | interrupt controller |
94+
+-----------+------------+-----------------------+
95+
| SYSTICK | on-chip | system clock |
96+
+-----------+------------+-----------------------+
97+
| UART | on-chip | serial |
98+
+-----------+------------+-----------------------+
99+
| GPIO | on-chip | gpio |
100+
+-----------+------------+-----------------------+
101+
| PINMUX | on-chip | pinctrl |
102+
+-----------+------------+-----------------------+
103+
| CLOCKMUX | on-chip | clockctl |
104+
+-----------+------------+-----------------------+
105+
106+
More details about the supported peripherals are available in `MSPM0G3507 TRM`_.
107+
Other hardware features are not currently supported by the Zephyr kernel.
108+
109+
Building and Flashing
110+
*********************
111+
112+
Building
113+
========
114+
115+
Follow the :ref:`getting_started` instructions for Zephyr application development.
116+
117+
For example, to build the blinky application for the MSPM0G3507 LaunchPad:
118+
119+
.. zephyr-app-commands::
120+
:zephyr-app: samples/basic/blinky
121+
:board: lp_mspm0g3507
122+
:goals: build
123+
124+
The resulting ``zephyr.bin`` binary in the build directory can be flashed onto
125+
MSPM0G3507 LaunchPad using the steps mentioned below.
126+
127+
Flashing
128+
========
129+
130+
Open OCD is used to program the flash memory on the devices. It may be necessary in earlier versions to use a branch of open OCD onto the device.
131+
132+
Before OpenOCD is public, one can clone `This Repo <https://github.com/nmenon/openocd/tree/mspm0>`_, and then this can be built with
133+
134+
```
135+
cd <cloned_OPENOCD_dir>
136+
./bootstrap (when building from the git repository)
137+
./configure --enable-xds110
138+
make
139+
sudo make install
140+
```
141+
142+
Then after the build, it is possible to flash the device by passing additional arguments to the flash command
143+
144+
```
145+
west flash --openocd <path to cloned dir>/src/openocd --openocd-search <path to cloned dir>/tcl
146+
```
147+
148+
149+
`UniFlash`_ can also be used to program the flash memory if needed. The flash utility,
150+
however, requires the use of 8-byte aligned words, so adding alignment to the linker file is necessary.
151+
152+
Debugging
153+
=========
154+
155+
The flashing method described above does not include symbols. Thus, debugging requires an additional step to load the symbols.
156+
This section shows how to debug the MSPM0G3507 LaunchPad board using `CCS IDE`_. More information
157+
on debugging using CCS can be found in `CCS User's Guide`_.
158+
159+
In general, the steps for debugging in CCS are:
160+
161+
1. Open CCS
162+
2. Go to :menuselection:`Window --> Show View --> Target Configruation`
163+
3. Import target confguration by right clicking User Defined, selecting Import target configuration and pointing to the lp_mspm0g3507/support/MSPM0G3507.ccxml
164+
4. Launch target configuration by right clicking the new MSPM0G3507.ccxml file and clicking Launch target configuration
165+
5. Plug in the device and connect to it by going to :menuselection:`Run --> Connect Target`
166+
6. Go to :menuselection:`Run --> Load --> Load Symbols and load in the zephyr.elf file loaded`
167+
7. Use CCS to debug
168+
169+
References
170+
**********
171+
172+
TI MSPM0 MCU Page:
173+
https://www.ti.com/microcontrollers-mcus-processors/arm-based-microcontrollers/arm-cortex-m0-mcus/overview.html
174+
175+
TI MSPM0G3507 Product Page:
176+
https://www.ti.com/product/MSPM0G3507
177+
178+
TI MSPM0 SDK:
179+
https://www.ti.com/tool/MSPM0-SDK
180+
181+
.. _CCS User's Guide:
182+
https://software-dl.ti.com/ccs/esd/documents/users_guide/index.html
183+
184+
.. _MSPM0G3507 TRM:
185+
https://www.ti.com/lit/slau846
186+
187+
.. _TI LP_MSPM0G3507 Product Page:
188+
https://www.ti.com/tool/LP-MSPM0G3507
189+
190+
.. _UniFlash:
191+
http://processors.wiki.ti.com/index.php/UniFlash_v4_Quick_Guide#Command_Line_Interface
192+
193+
.. _CCS IDE:
194+
http://www.ti.com/tool/ccstudio
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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_2_b {
30+
gpios = <&gpiob 22 GPIO_ACTIVE_HIGH>;
31+
label = "Blue RBG LED";
32+
};
33+
led1: led_2_r {
34+
gpios = <&gpiob 26 GPIO_ACTIVE_HIGH>;
35+
label = "Red RBG LED";
36+
};
37+
led2: led_2_g {
38+
gpios = <&gpiob 27 GPIO_ACTIVE_HIGH>;
39+
label = "Green RBG LED";
40+
};
41+
led3: led_1 {
42+
gpios = <&gpioa 0 GPIO_ACTIVE_LOW>;
43+
label = "Red LED";
44+
};
45+
};
46+
47+
keys {
48+
compatible = "gpio-keys";
49+
btn0: btn_0 {
50+
gpios = <&gpiob 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
51+
label = "Switch 2";
52+
zephyr,code = <INPUT_KEY_0>;
53+
};
54+
btn1: btn_1 {
55+
gpios = <&gpioa 18 GPIO_ACTIVE_HIGH>;
56+
label = "Switch 1";
57+
zephyr,code = <INPUT_KEY_1>;
58+
};
59+
};
60+
};
61+
62+
&cpu0 {
63+
clock-frequency = <DT_FREQ_M(80)>;
64+
};
65+
66+
&clkmux {
67+
clock-source = <&pll>;
68+
clock-frequency = <DT_FREQ_M(80)>;
69+
uclk-div = <2>;
70+
};
71+
72+
&gpioa {
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_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 Clock Control
16+
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)