-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Add TI LP-MSPM0L1117 board #102398
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
base: main
Are you sure you want to change the base?
Add TI LP-MSPM0L1117 board #102398
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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_MSPM0L1117 | ||
| select SOC_MSPM0L1117 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| board: | ||
| name: lp_mspm0l1117 | ||
| full_name: MSPM0L1117 Launchpad | ||
| vendor: ti | ||
| socs: | ||
| - name: mspm0l1117 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,130 @@ | ||
| .. zephyr:board:: lp_mspm0l1117 | ||
|
|
||
| Overview | ||
| ******** | ||
|
|
||
| MSPM0L111x microcontrollers (MCUs) are part of the MSP highly-integrated, ultra-low-power 32-bit MCU | ||
| family based on the enhanced Arm® Cortex®-M0+ core platform operating at up to 32MHz frequency. These | ||
| cost-optimized MCUs offer high-performance analog peripheral integration and excellent low-power current | ||
| consumption. The MCUs also support extended temperature ranges from -40°C to 125°C and operate with | ||
| supply voltages ranging from 1.62V to 3.6V. | ||
|
|
||
| The device has up to 128KB of embedded flash memory with built-in error correction code (ECC) and up | ||
| to 16KB SRAM. The flash memory is organized into two main banks to support field firmware updates, with | ||
| address swap support provided between the two main banks. | ||
|
|
||
| Hardware | ||
| ******** | ||
|
|
||
| Launchpad MSPM0L1117 provides the following hardware components: | ||
|
|
||
| - MSPM0L1117SPTR SoC | ||
| - Arm® 32-bit Cortex®-M0+ CPU with memory protection unit, frequency up to 32MHz | ||
| - VDD from 1.62 V to 3.6 V | ||
| - 128 KB Flash | ||
| - 16 KB SRAM with ECC or parity | ||
| - GPIO with external interrupt capability | ||
| - 1 12-bit ADC with 13 channels | ||
| - RTC | ||
| - Four timers supporting up to 14 PWM outputs | ||
| - Watchdog Timers (2) | ||
| - UART (2) | ||
| - I2C (1) | ||
| - SPI (1) | ||
| - DMA Controller | ||
|
|
||
| .. image:: img/LP-MSPM0L1117.png | ||
| :align: center | ||
| :alt: MSPM0L1117 LaunchPad development board | ||
|
|
||
| Zephyr uses the ``lp_mspm0l1117`` board for building LP_MSPM0L1117 | ||
|
|
||
| Features: | ||
| ********* | ||
|
|
||
| - Onboard XDS110 debug probe | ||
| - EnergyTrace technology available for ultra-low-power debugging | ||
| - 2 buttons, 1 LED and 1 RGB LED for user interaction | ||
|
|
||
| Details on the MSPM0L1117 LaunchPad can be found on the `TI LP_MSPM0L1117 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 MSPM0L1117 LaunchPad: | ||
|
|
||
| .. zephyr-app-commands:: | ||
| :zephyr-app: samples/hello_world | ||
| :board: lp_mspm0l1117 | ||
| :goals: build | ||
|
|
||
| The resulting ``zephyr.bin`` binary in the build directory can be flashed onto | ||
| MSPM0L1117 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_mspm0l1117 | ||
| :goals: debug | ||
|
|
||
| References | ||
| ********** | ||
|
|
||
| TI MSPM0 MCU Page: | ||
| https://www.ti.com/microcontrollers-mcus-processors/arm-based-microcontrollers/arm-cortex-m0-mcus/overview.html | ||
|
|
||
| TI MSPM0L1117 Product Page: | ||
| https://www.ti.com/product/MSPM0L1117 | ||
|
|
||
| TI MSPM0 SDK: | ||
| https://www.ti.com/tool/MSPM0-SDK | ||
|
|
||
| .. _MSPM0L1117 TRM: | ||
| https://www.ti.com/lit/slau847 | ||
|
|
||
| .. _TI LP_MSPM0L1117 Product Page: | ||
| https://www.ti.com/tool/LP-MSPM0L1117 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| /* | ||
| * Copyright (c) 2025 Texas Instruments | ||
| * Copyright (c) 2025 Linumiz GmbH | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| /dts-v1/; | ||
|
|
||
| #include <ti/mspm0/l/mspm0l1117.dtsi> | ||
| #include <ti/mspm0/l/mspm0l111x-pinctrl.dtsi> | ||
| #include <zephyr/dt-bindings/clock/mspm0_clock.h> | ||
| #include <zephyr/dt-bindings/gpio/gpio.h> | ||
|
|
||
| / { | ||
| model = "TI LP_MSPM0L1117/MSPM0L1117"; | ||
| compatible = "ti,mspm0l1117"; | ||
|
|
||
| aliases { | ||
| led0 = &led0; | ||
| }; | ||
|
|
||
| chosen { | ||
| zephyr,sram = &sram0; | ||
| zephyr,flash = &flash0; | ||
| zephyr,console = &uart0; | ||
| zephyr,shell-uart = &uart0; | ||
| zephyr,code-partition = &code_partition; | ||
| }; | ||
|
|
||
| leds { | ||
| compatible = "gpio-leds"; | ||
|
|
||
| led0: led_0 { | ||
| gpios = <&gpioa 0 GPIO_ACTIVE_HIGH>; | ||
| label = "RED LED"; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| &flash0 { | ||
| status = "okay"; | ||
|
|
||
| partitions { | ||
| compatible = "fixed-partitions"; | ||
| #address-cells = <1>; | ||
| #size-cells = <1>; | ||
|
|
||
| code_partition: partition@0 { | ||
| label = "code_partition"; | ||
| reg = <0x00000000 DT_SIZE_K(128)>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| &pinctrl { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &gpioa { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &uart0 { | ||
| status = "okay"; | ||
| current-speed = <115200>; | ||
| pinctrl-0 = <&uart0_tx_pa10 &uart0_rx_pa11>; | ||
| pinctrl-names = "default"; | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| identifier: lp_mspm0l1117 | ||
| name: TI MSPM0L1117 Launchpad | ||
| type: mcu | ||
| arch: arm | ||
| toolchain: | ||
| - zephyr | ||
| - gnuarmemb | ||
| ram: 16 | ||
| flash: 128 | ||
| supported: | ||
| - gpio | ||
| - pinctrl | ||
| - uart | ||
| vendor: ti |
| 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 |
| 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] | ||
|
Member
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. In upstream openocd, the path for this file is now openocd -f tcl/board/ti/mspm0-launchpad.cfg -c 'init' -c 'reset init' -c 'flash write_image erase /mnt/zephyr.hex' -c 'reset run' -c shutdownBasically, the openocd command Also there is already
Contributor
Author
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. Well, I didn't used OpenOCD for debugging/flashing. I used Lauterbach. This file was copied from
Member
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. Ok, so at least And my openocd.cfg is as follows: |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,9 @@ config SOC_SERIES_MSPM0L | |
| select CLOCK_CONTROL | ||
| select SOC_EARLY_INIT_HOOK | ||
|
|
||
| config SOC_MSPM0L1117 | ||
|
Member
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. A PR for this already exists: #104522
Contributor
Author
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. Didn't know about your PR, Then I should drop my change and rebase on top of yours. |
||
| select CPU_HAS_ARM_MPU | ||
|
|
||
| config SOC_MSPM0L2227 | ||
| select CPU_HAS_ARM_MPU | ||
|
|
||
|
|
||
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.
You are just pointing to upstream openocd now (which is correct). So the line probably needs to be updated? It's just that the openocd shipped with zephyr sdk does not have mspm0 support. Upstream openocd already has the support.
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.
In similar fashion to openocd.cfg, this part was taken from l2228 documentation.
But I guess, that in both cases this information should be update.