-
Notifications
You must be signed in to change notification settings - Fork 8.3k
MSPM0 MSPM0G51xx support #99344
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
d-philpot
wants to merge
7
commits into
zephyrproject-rtos:main
Choose a base branch
from
TexasInstruments:add_mspm0g51xx_support
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.
+521
−4
Open
MSPM0 MSPM0G51xx support #99344
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c6107a0
west: update to in flight pr
d-philpot 35257cd
soc: add soc definitions for MSPM0G51xx
d-philpot 67c1c80
dts: add files for MSPM0G51xx family
d-philpot ceab05a
boards: add LP_MSPM0G5187 board support
d-philpot fee99fb
scripts: checkpatch: add UNICOMM_Inst_Regs
d-philpot 0261d5c
serial: update uart driver to account for UNICOMM
d-philpot c296679
gpio: update pin LUT for MSPM0G51xx
d-philpot 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) 2025 Texas Instruments | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| config BOARD_LP_MSPM0G5187 | ||
| select SOC_MSPM0G5187 |
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=MSPM0G5187" "--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_mspm0g5187 | ||
| full_name: MSPM0G5187 Launchpad | ||
| vendor: ti | ||
| socs: | ||
| - name: mspm0g5187 |
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_mspm0g5187 | ||
|
|
||
| Overview | ||
| ******** | ||
|
|
||
| MSPM0G511x microcontrollers (MCUs) are part of the MSP highly integrated, ultra-low-power 32-bit MCU | ||
| family based on the enhanced Arm® Cortex®-M0+ 32-bit core platform, operating at up to 80-MHz frequency. | ||
| These MCUs offer a blend of cost optimization and design flexibility for applications requiring 32KB to 128KB | ||
| of flash memory in small packages (down to 4 mm x 4 mm) or high pin count packages (up to 64 pins). | ||
| These devices include USB 2.0-FS interface, digital audio interface, cybersecurity enablers, high performance | ||
| integrated analog, and provide excellent low power performance across the operating temperature range. | ||
|
|
||
| Hardware | ||
| ******** | ||
|
|
||
| The MSPM0G51xx devices provide up to 128KB embedded flash program memory with built-in error correction | ||
| code (ECC) and up to 32KB SRAM with a hardware parity option. These MCUs also incorporate a | ||
| memory protection unit, 12-channel DMA, and a variety of peripherals including | ||
|
|
||
| * Analog. | ||
|
|
||
| * One 12-bit 4-Msps ADCs. | ||
|
|
||
| * Configurable internal shared voltage reference. | ||
|
|
||
| * One high speed comparator with built-in reference DAC. | ||
|
|
||
| * Digital. | ||
|
|
||
| * Two 16-bit advanced control timers. | ||
|
|
||
| * Four general-purpose timers. | ||
|
|
||
| * Two 16-bit general-purpose timers. | ||
|
|
||
| * One 16-bit general-purpose timer with low-power operation in STANDBY mode. | ||
|
|
||
| * One 16-bit timer with deadband support and up to 8 PWM Channels. | ||
|
|
||
| * One basic software timer including 4 indenpendent configurable 16-bit counters. | ||
|
|
||
| * Two windowed-watchdog timers. | ||
|
|
||
| * One RTC with alarm and calendar modes. | ||
|
|
||
| * Data Integrity and Encryption. | ||
|
|
||
| * One AES HW accelerator capable of CTR and CBC modes. | ||
|
|
||
| * One Cyclic Redundancy Check (CRC) accelerator. | ||
|
|
||
| * Communication. | ||
|
|
||
| * Two configurable serial interfaces (UNICOMM) supporting UART or I2C. | ||
|
|
||
| * One configurable serial interface supporting UART or SPI. | ||
|
|
||
| * One dedicated SPI interface up to 32 Mbits/s. | ||
|
|
||
| * One digital audio interface (I2S) supporting controller and target mode. | ||
|
|
||
| * One USB2.0 interface with full-speed (12-Mbps) compliant device and host mode. | ||
|
|
||
| Zephyr uses the ``lp_mspm0g5187`` board for building LP_MSPM0G5187 | ||
|
|
||
| Features | ||
| ******** | ||
|
|
||
| - Onboard XDS110 debug probe | ||
| - EnergyTrace technology available for ultra-low-power debugging | ||
| - 3 buttons, 1 LED and 1 RGB LED for user interaction | ||
| - One microSD slot | ||
| - One microphone | ||
| - One I2S based audio ADC | ||
|
|
||
| Details on the MSPM0G5187 LaunchPad can be found on the `TI LP_MSPM0G5187 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 MSPM0G5187 LaunchPad: | ||
|
|
||
| .. zephyr-app-commands:: | ||
| :zephyr-app: samples/hello_world | ||
| :board: lp_mspm0g5187 | ||
| :goals: build | ||
|
|
||
| The resulting ``zephyr.bin`` binary in the build directory can be flashed onto | ||
| MSPM0G5187 LaunchPad using the steps mentioned below. | ||
|
|
||
| Flashing | ||
| ======== | ||
|
|
||
| OpenOCD can be used to program the flash memory on the devices. | ||
|
|
||
| .. code-block:: console | ||
|
|
||
| $ west flash --openocd <path to cloned dir>/src/openocd --openocd-search <path to cloned dir>/tcl | ||
|
|
||
| Flashing can also be done 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_mspm0g5187 | ||
| :goals: debug | ||
|
|
||
| References | ||
| ********** | ||
|
|
||
| - `TI MSPM0 MCU Page`_ | ||
| - `MSPM0G5187 TRM`_ | ||
|
|
||
| .. _TI MSPM0 MCU Page: | ||
| https://www.ti.com/microcontrollers-mcus-processors/arm-based-microcontrollers/arm-cortex-m0-mcus/overview.html | ||
|
|
||
| .. _MSPM0G5187 TRM: | ||
| https://www.ti.com/lit/slau846 | ||
|
|
||
| .. _TI LP_MSPM0G5187 Product Page: | ||
| https://www.ti.com/tool/LP-MSPM0G5187 |
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,133 @@ | ||
| /* SPDX-License-Identifier: Apache-2.0 */ | ||
|
|
||
| /dts-v1/; | ||
|
|
||
| #include <ti/mspm0/g/mspm0g5187.dtsi> | ||
| #include <ti/mspm0/g/mspm0g51xx-pinctrl.dtsi> | ||
| #include <zephyr/dt-bindings/clock/mspm0_clock.h> | ||
| #include <zephyr/dt-bindings/gpio/gpio.h> | ||
| #include <zephyr/dt-bindings/input/input-event-codes.h> | ||
|
|
||
| / { | ||
| model = "TI LP_MSPM0G5117"; | ||
| compatible = "ti,mspm0g5117"; | ||
|
|
||
| aliases { | ||
| led0 = &led0; | ||
| led1 = &led1; | ||
| sw0 = &btn0; | ||
| sw1 = &btn1; | ||
| uart0 = &unicomm0_uart; | ||
| }; | ||
|
|
||
| chosen { | ||
| zephyr,sram = &sram0; | ||
| zephyr,flash = &flash0; | ||
| zephyr,console = &unicomm0_uart; | ||
| zephyr,shell-uart = &unicomm0_uart; | ||
| zephyr,code-partition = &slot0_partition; | ||
| }; | ||
|
|
||
| leds { | ||
| compatible = "gpio-leds"; | ||
| led0: led_0 { | ||
|
Contributor
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. this file is non compliant with the dts requirements |
||
| gpios = <&gpiob 13 GPIO_ACTIVE_HIGH>; | ||
| label = "Blue LED"; | ||
| }; | ||
| led1: led_1 { | ||
| gpios = <&gpioa 17 GPIO_ACTIVE_HIGH>; | ||
| label = "Red LED"; | ||
| }; | ||
| led2: led_2 { | ||
| gpios = <&gpioa 24 GPIO_ACTIVE_HIGH>; | ||
| label = "Green LED"; | ||
| }; | ||
| }; | ||
|
|
||
| keys { | ||
| compatible = "gpio-keys"; | ||
| btn0: btn_0 { | ||
| gpios = <&gpiob 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; | ||
| label = "Switch 3"; | ||
| zephyr,code = <INPUT_KEY_0>; | ||
| }; | ||
| btn1: btn_1 { | ||
| gpios = <&gpioa 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; | ||
| label = "Switch 2"; | ||
| zephyr,code = <INPUT_KEY_1>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| &cpu0 { | ||
| clock-frequency = <DT_FREQ_M(80)>; | ||
| }; | ||
|
|
||
| &ulpclk { | ||
| clock-frequency = <DT_FREQ_M(40)>; | ||
| clk-div = <2>; | ||
| }; | ||
|
|
||
| &mclk { | ||
| clock-frequency = <DT_FREQ_M(80)>; | ||
| clocks = <&hsclk 0>; | ||
| }; | ||
|
|
||
| &hsclk { | ||
| clocks = <&syspll2x 0>; | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &syspll2x { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &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 0x8000>; | ||
| }; | ||
|
|
||
| slot1_partition: partition@10000 { | ||
| label = "image-1"; | ||
| reg = <0x00010000 0x8000>; | ||
| }; | ||
|
|
||
| storage_partition: partition@18000 { | ||
| label = "storage"; | ||
| reg = <0x00018000 0x8000>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| &pinctrl { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &gpioa { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &gpiob { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &unicomm0_uart { | ||
| compatible = "ti,mspm0-uart"; | ||
| status = "okay"; | ||
| current-speed = <115200>; | ||
| pinctrl-0 = <&uc0_tx_pa10 &uc0_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,14 @@ | ||
| identifier: lp_mspm0g5187 | ||
| name: TI MSPM0G5187 Launchpad | ||
| type: mcu | ||
| arch: arm | ||
| toolchain: | ||
| - zephyr | ||
| - gnuarmemb | ||
| - xtools | ||
| ram: 32 | ||
| flash: 128 | ||
| supported: | ||
| - uart | ||
| - gpio | ||
| 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 | ||
| 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] |
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.
I'm not a person responsible for this, but maybe this image is of too high resolution. @kartben should the board image be under ca 500 KiB?
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.
this needs to be about 50KiB or so