Skip to content

Commit f81cd5b

Browse files
committed
boards: add lp_mspm0g3507/mspm0g3507
Added TI LP_MSPM0G3507 board for MSPM0G3507 Signed-off-by: Jackson Farley <[email protected]>
1 parent 1c80753 commit f81cd5b

File tree

9 files changed

+301
-0
lines changed

9 files changed

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