-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Add support for TI's MSPM0L series #90809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
parthitce
wants to merge
10
commits into
zephyrproject-rtos:main
Choose a base branch
from
linumiz:upstream/ti/mspm0-lx
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+851
−61
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c5d78d3
manifest: ti: add support for MSPM0L series
parthitce 24e9eee
drivers: pinctrl: add pin function for 11/0xB
parthitce 598a648
soc: ti: mspm0: restructure common files
parthitce 763f6f1
drivers: clock: conditional compile ulpclk udiv divider
parthitce bfa3abb
soc: ti: mspm0: add support for L series
parthitce d6792c2
drivers: gpio: add support for mspm0L series banks
parthitce cb3fb11
drivers: gpio: fix pincm lut size
parthitce ab25fe5
dts: arm: ti/mspm0: add support for L series
parthitce 6f18d93
boards: ti/mspm0: add support for L2228 launchpad
parthitce 5bccce3
drivers: gpio: fix compliance check for clang-format
parthitce File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2024 Texas Instruments | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_LP_MSPM0L2228 | ||
select SOC_MSPM0L2228 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# # SPDX-License-Identifier: Apache-2.0 | ||
|
||
board_runner_args(jlink "--device=MSPM0L2228" "--speed=4000") | ||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) | ||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
board: | ||
name: lp_mspm0l2228 | ||
full_name: MSPM0L2228 Launchpad | ||
vendor: ti | ||
socs: | ||
- name: mspm0l2228 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
.. zephyr:board:: lp_mspm0l2228 | ||
|
||
Overview | ||
******** | ||
|
||
MSPM0Lx22x microcontrollers (MCUs) are part of the highly integrated, ultra-low-power 32-bit MSPM0 MCU | ||
family based on the Arm® Cortex®-M0+ 32-bit core platform, operating at up to 32MHz frequency. These | ||
MCUs offer a blend of cost optimization and design flexibility for applications requiring 128KB to 256KB of | ||
flash memory in small packages (down to 4mm x 4mm) or high pin count packages (up to 80 pins). These | ||
devices include a VBAT backup island, an optional segmented LCD controller (on MSPM0L222x), cybersecurity | ||
enablers, and high-performance integrated analog, and provide excellent low-power performance across the | ||
operating temperature range. | ||
|
||
Up to 256KB of embedded flash program memory with built-in error correction code (ECC) and up to 32KB | ||
SRAM with ECC and parity protection is provided. The flash memory is organized into two main banks to support | ||
field firmware updates, with address swap support provided between the two main banks. An additional 32-byte | ||
backup memory is provided in the VBAT island, supplied by the VBAT pin and retained even when the main | ||
supply (VDD) is lost. | ||
|
||
Hardware | ||
******** | ||
|
||
Launchpad MSPM0L2228 provides the following hardware components: | ||
|
||
- MSPM0L2228TPN SoC | ||
- ARM |reg| 32-bit Cortex |reg|-M0+ CPU | ||
- 32 MHz max CPU frequency | ||
- VDD from 1.62 V to 3.6 V | ||
- 256 KB Flash | ||
- 32 KB SRAM with ECC or parity | ||
- GPIO with external interrupt capability | ||
- 12-bit ADC with 26 channels | ||
- RTC | ||
- Six timers supporting up to 18 PWM outputs | ||
- Watchdog Timers (2) | ||
- UART (5) | ||
- I2C (2) | ||
- SPI (2) | ||
- DMA Controller | ||
|
||
.. image:: img/LP-MSPM0L2228.png | ||
:align: center | ||
:alt: MSPM0L2228 LaunchPad development board | ||
|
||
Zephyr uses the ``lp_mspm0l2228`` board for building LP_MSPM0L2228 | ||
|
||
Features: | ||
********* | ||
|
||
- Onboard XDS110 debug probe | ||
- EnergyTrace technology available for ultra-low-power debugging | ||
- 2 buttons, 1 LED and 1 RGB LED for user interaction | ||
- Temperature sensor circuit | ||
- Light sensor circuit | ||
- External OPA2365 (default buffer mode) for ADC (up to 4 Msps) evaluation | ||
- Onboard 32.768-kHz and 40-MHz crystals | ||
- RC filter for ADC input (unpopulated by default) | ||
|
||
Details on the MSPM0L2228 LaunchPad can be found on the `TI LP_MSPM0L2228 Product Page`_. | ||
|
||
Supported Features | ||
================== | ||
|
||
.. zephyr:board-supported-hw:: | ||
|
||
Building and Flashing | ||
********************* | ||
|
||
Building | ||
======== | ||
|
||
Follow the :ref:`getting_started` instructions for Zephyr application development. | ||
|
||
For example, to build the blinky application for the MSPM0L2228 LaunchPad: | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/hello_world | ||
:board: lp_mspm0l2228 | ||
:goals: build | ||
|
||
The resulting ``zephyr.bin`` binary in the build directory can be flashed onto | ||
MSPM0L2228 LaunchPad using the steps mentioned below. | ||
|
||
Flashing | ||
======== | ||
|
||
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. | ||
|
||
Before OpenOCD is public, one can clone `This Repo <https://github.com/openocd-org/openocd.git>`_, | ||
and then this can be built with | ||
|
||
.. code-block:: console | ||
|
||
$ cd <cloned_OPENOCD_dir> | ||
$ ./bootstrap (when building from the git repository) | ||
$ ./configure | ||
$ make | ||
$ sudo make install | ||
|
||
Then after the build, it is possible to flash the device by passing additional arguments to the flash command | ||
|
||
.. code-block:: console | ||
|
||
$ west flash --openocd <path to cloned dir>/src/openocd --openocd-search <path to cloned dir>/tcl | ||
|
||
Flashing using JLINK | ||
|
||
.. code-block:: console | ||
|
||
$ west flash --runner jlink | ||
|
||
Debugging | ||
========= | ||
|
||
You can debug an application in the usual way. Here is an example for the | ||
:zephyr:code-sample:`hello_world` application. | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/hello_world | ||
:board: lp_mspm0l2228 | ||
:goals: debug | ||
|
||
References | ||
********** | ||
|
||
TI MSPM0 MCU Page: | ||
https://www.ti.com/microcontrollers-mcus-processors/arm-based-microcontrollers/arm-cortex-m0-mcus/overview.html | ||
|
||
TI MSPM0L2228 Product Page: | ||
https://www.ti.com/product/MSPM0L2228 | ||
|
||
TI MSPM0 SDK: | ||
https://www.ti.com/tool/MSPM0-SDK | ||
|
||
.. _MSPM0L2228 TRM: | ||
https://www.ti.com/lit/slau847 | ||
|
||
.. _TI LP_MSPM0L2228 Product Page: | ||
https://www.ti.com/tool/LP-MSPM0L2228 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
/* | ||
* Copyright (c) 2025 Texas Instruments | ||
* Copyright (c) 2025 Linumiz GmbH | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
|
||
#include <ti/mspm0/l/mspm0l2228.dtsi> | ||
#include <ti/mspm0/l/mspm0l222x-pinctrl.dtsi> | ||
#include <zephyr/dt-bindings/clock/mspm0_clock.h> | ||
#include <zephyr/dt-bindings/gpio/gpio.h> | ||
|
||
/ { | ||
model = "TI LP_MSPM0L2228/MSPM0L2228"; | ||
compatible = "ti,mspm0l2228"; | ||
|
||
aliases { | ||
led0 = &led0; | ||
led1 = &led1; | ||
}; | ||
|
||
chosen { | ||
zephyr,sram = &sram0; | ||
zephyr,flash = &flash0; | ||
zephyr,console = &uart0; | ||
zephyr,shell-uart = &uart0; | ||
zephyr,code-partition = &slot0_partition; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
|
||
led0: led_0 { | ||
gpios = <&gpiob 10 GPIO_ACTIVE_HIGH>; | ||
label = "RED LED"; | ||
}; | ||
|
||
led1: led_1 { | ||
gpios = <&gpiob 9 GPIO_ACTIVE_HIGH>; | ||
label = "Green LED"; | ||
}; | ||
}; | ||
}; | ||
|
||
&flash0 { | ||
status = "okay"; | ||
|
||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
boot_partition: partition@0 { | ||
label = "mcuboot"; | ||
reg = <0x00000000 0x8000>; | ||
}; | ||
|
||
slot0_partition: partition@8000 { | ||
label = "image-0"; | ||
reg = <0x00008000 0x1c000>; | ||
}; | ||
|
||
slot1_partition: partition@24000 { | ||
label = "image-1"; | ||
reg = <0x00024000 0x1c000>; | ||
}; | ||
}; | ||
}; | ||
|
||
&pinctrl { | ||
status = "okay"; | ||
}; | ||
|
||
&gpioa { | ||
status = "okay"; | ||
}; | ||
|
||
&gpiob { | ||
status = "okay"; | ||
}; | ||
|
||
&gpioc { | ||
status = "okay"; | ||
}; | ||
|
||
&uart0 { | ||
status = "okay"; | ||
current-speed = <115200>; | ||
pinctrl-0 = <&uart0_tx_pa10 &uart0_rx_pa11>; | ||
pinctrl-names = "default"; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
identifier: lp_mspm0l2228 | ||
name: TI MSPM0L2228 Launchpad | ||
type: mcu | ||
arch: arm | ||
toolchain: | ||
- zephyr | ||
- gnuarmemb | ||
- xtools | ||
ram: 32 | ||
flash: 256 | ||
supported: | ||
- gpio | ||
- pinctrl | ||
- uart | ||
vendor: ti |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Enable uart driver | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. *UART |
||
CONFIG_SERIAL=y | ||
|
||
# Enable console | ||
CONFIG_CONSOLE=y | ||
CONFIG_UART_CONSOLE=y | ||
|
||
CONFIG_CLOCK_CONTROL=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source [find interface/xds110.cfg] | ||
adapter speed 10000 | ||
|
||
source [find target/ti_mspm0.cfg] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
convert to webp then put through https://tinypng.com/