Skip to content

Commit 9aece5a

Browse files
boards: ti: lp_mspm33c321a: update board doc and supported features
Rewrite board index.rst with new supported features. Add peripheral listing, board image, pin mapping, clock tree, OpenOCD flashing/debugging, CCS alternative, recovery commands, and reference links. Update supported features in board YAML to include all functional drivers. Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
1 parent 86d743b commit 9aece5a

File tree

2 files changed

+199
-50
lines changed

2 files changed

+199
-50
lines changed

boards/ti/lp_mspm33c321a/doc/index.rst

Lines changed: 192 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -10,97 +10,239 @@ ranges, and operate with supply voltages ranging from 1.62 V to 3.6 V.
1010

1111
The MSPM33C321A devices provide 1MB embedded flash program memory with built-in error correction
1212
code (ECC) and 256KB SRAM with hardware parity option. These MCUs also incorporate a
13-
memory protection unit, DMA, and a variety of peripherals including GPIO, ADC, timers, and
14-
communication interfaces.
13+
memory protection unit, DMA, and a variety of peripherals including:
14+
15+
* Analog.
16+
17+
* One 12-bit high-speed SAR ADC (HSADC) with 4 sequencers and up to 32 input channels.
18+
19+
* Configurable internal voltage reference (1.4V, 2.5V) and external VREF support.
20+
21+
* Post-processing blocks (PPB) with oversampling (up to 8x) and right-shift.
22+
23+
* Digital.
24+
25+
* Multiple timer groups (TIMG) with alarm and capture/compare support.
26+
27+
* Up to 3 GPIO ports (GPIOA, GPIOB, GPIOC) with interrupt support.
28+
29+
* DMA controller with up to 16 channels.
30+
31+
* Communication.
32+
33+
* UNICOMM (Universal Communication) peripherals supporting UART, SPI, and I2C modes.
34+
35+
* Multiple UART instances with polling and interrupt-driven modes.
36+
37+
* SPI with configurable clock polarity/phase and up to 32-bit word size.
38+
39+
* I2C with controller and target modes, 7-bit addressing, standard (100 kHz) and fast (400 kHz) speeds.
40+
41+
.. image:: img/lp_mspm33c321a_board.webp
42+
:align: center
43+
:alt: LP_MSPM33C321A LaunchPad development board
1544

1645
Hardware
1746
********
1847

1948
The LP_MSPM33C321A LaunchPad is a development platform for the MSPM33C321A microcontroller.
2049
Zephyr uses the ``lp_mspm33c321a`` board configuration for building applications for this platform.
2150

51+
Details on the LP_MSPM33C321A LaunchPad can be found on the `TI LP_MSPM33C321A Product Page`_.
52+
See the `MSPM33C321A Datasheet`_ for device specifications and the `MSPM33C321A TRM`_
53+
for detailed register-level documentation.
54+
2255
Board Features
2356
==============
2457

25-
* MSPM33C321A microcontroller with Arm® Cortex®-M33 core running at up to 160 MHz
26-
* 1MB Flash memory with ECC
27-
* 256KB SRAM
28-
* On-board XDS110 debugger
29-
* User LEDs and buttons
30-
* Multiple expansion headers for BoosterPack ecosystem compatibility
58+
- MSPM33C321A microcontroller with Arm® Cortex®-M33 core running at up to 160 MHz
59+
- 1MB Flash memory with ECC
60+
- 256KB SRAM with hardware parity
61+
- On-board XDS110 debug probe with SWD interface
62+
- User LEDs and push buttons
63+
- Multiple expansion headers for BoosterPack ecosystem compatibility
64+
- On-board 32.768-kHz crystal for LFCLK
65+
66+
Supported Features
67+
==================
68+
69+
.. zephyr:board-supported-hw::
3170
71+
Connections and IOs
72+
===================
3273

33-
Development Environment
34-
=======================
74+
LEDs
75+
----
3576

36-
The following development environment was used while developing and testing:
77+
* **LED1** (red) = **PA0**
3778

38-
* TI Code Composer Studio (CCS) version 20.3.0 (`Download Link <https://www.ti.com/tool/download/CCSTUDIO/20.3.0>`_)
39-
* Zephyr SDK version 0.17.4
40-
* Zephyr version v4.2.0
79+
Push Buttons
80+
------------
4181

42-
Building and Flashing
43-
*********************
82+
* **S2** (user button) = **PB21**
83+
84+
Default Zephyr Peripheral Mapping
85+
----------------------------------
86+
87+
- UART (console): UNICOMM12 — TX on PA10, RX on PA11
88+
- SPI: UNICOMM2 — SCLK on PB18, POCI on PB19, PICO on PB17, CS on PA2
89+
- I2C: UNICOMM1_0 — SDA on PA0, SCL on PA1
90+
91+
System Clock
92+
------------
93+
94+
The MSPM33C321A clock tree is driven by SYSOSC (32 MHz) through the system PLL:
95+
96+
- SYSOSC (32 MHz) → SYSPLL → HSCLK → MCLK (160 MHz)
97+
- ULPCLK: 40 MHz ultra-low-power clock
98+
- LFCLK: 32.768 kHz low-frequency clock
99+
100+
Serial Port
101+
------------
102+
103+
The Zephyr console output is assigned to UNICOMM12 UART.
104+
Default settings are 115200 8N1 with no flow control.
105+
106+
The serial port is accessible via the on-board XDS110 debugger's virtual COM port over USB.
107+
108+
Programming and Debugging
109+
*************************
110+
111+
.. zephyr:board-supported-runners::
112+
113+
Applications for the ``lp_mspm33c321a`` board can be built and flashed using
114+
OpenOCD with the on-board XDS110 debug probe.
44115

45116
Building
46117
========
47118

48119
Follow the :ref:`getting_started` instructions for Zephyr application development.
49120

50-
For example, to build the basic/blinky application for the MSPM33C321A LaunchPad:
121+
For example, to build the :zephyr:code-sample:`blinky` application:
51122

52123
.. zephyr-app-commands::
53124
:zephyr-app: samples/basic/blinky
54125
:board: lp_mspm33c321a
55126
:goals: build
56127

57-
The resulting ``zephyr.elf`` binary in the build directory can be loaded onto
58-
MSPM33C321A LaunchPad using the steps mentioned below.
59-
60128
Flashing
61129
========
62130

63-
Currently, the MSPM33C321A board does not support the west flashing tool or OpenOCD support.
64-
Instead, we use SRAM-based loading where we build the samples and load the zephyr.elf file
65-
from the build directory to the TI Code Composer Studio (CCS) IDE in debugger mode.
131+
OpenOCD is used to program the flash memory on the device via the on-board XDS110
132+
debug probe using SWD transport. A custom OpenOCD build with MSPM33 support is
133+
included in the workspace.
66134

67-
To flash the board:
135+
.. code-block:: console
68136
69-
1. Build your Zephyr application as described above
70-
2. Open TI Code Composer Studio IDE
71-
3. Create a new project or import an existing CCS project for the MSPM33C321A
72-
4. Start project less debug using MSPM33 target configuration(CCXML) file
73-
5. Connect to the MSPM33 core
74-
6. In the debugger, select "Run" > "Load" > "Load Program..."
75-
7. Browse to your Zephyr build directory and select the ``zephyr.elf`` file
76-
8. The program will be loaded into the SRAM of the device
77-
9. Click "Resume" to start the program execution
137+
$ west flash
78138
79-
Future updates to the Zephyr support for this board will include flash-based programming
80-
and support for the west flash command.
139+
The application is written to on-chip flash memory at address ``0x10000000`` and
140+
persists across power cycles.
81141

82-
Serial Console
83-
==============
142+
If using OpenOCD from a non-default location, you can pass additional arguments:
143+
144+
.. code-block:: console
145+
146+
$ west flash --openocd <path-to-openocd>/src/openocd --openocd-search <path-to-openocd>/tcl
147+
148+
Flashing with Multiple Boards
149+
------------------------------
84150

85-
The MSPM33C321A LaunchPad includes an on-board XDS110 debugger that also provides a
86-
virtual COM port over USB. This can be used for serial console output.
151+
When multiple LP_MSPM33C321A boards are connected to the same host, identify each
152+
board's XDS110 serial number:
87153

88-
To connect to the serial console, use a terminal emulator such as PuTTY, minicom, or screen
89-
with the following settings:
154+
.. code-block:: console
90155
91-
* Baud rate: 115200
92-
* Data bits: 8
93-
* Parity: None
94-
* Stop bits: 1
95-
* Flow control: None
156+
$ lsusb -v -d 0451:bef3 | grep iSerial
157+
158+
Then flash a specific board by passing its serial number to the OpenOCD adapter:
159+
160+
.. code-block:: console
161+
162+
$ west flash --cmd-pre-init "adapter serial <serial_number>"
163+
164+
For example, if ``lsusb`` reports ``iSerial 3 MG00DUT0``:
165+
166+
.. code-block:: console
167+
168+
$ west flash --cmd-pre-init "adapter serial MG00DUT0"
169+
170+
If using OpenOCD from a non-default location, combine both options:
171+
172+
.. code-block:: console
173+
174+
$ west flash --openocd ../openocd/src/openocd --openocd-search ../openocd/tcl \
175+
--cmd-pre-init "adapter serial MG00DUT0"
176+
177+
Flashing with Code Composer Studio
178+
-----------------------------------
179+
180+
Programs can also be loaded into SRAM using TI `Code Composer Studio`_ (CCS) IDE.
181+
Note that CCS uses SRAM-based loading only where we build the samples and load the zephyr.elf file
182+
from the build directory to the TI Code Composer Studio (CCS) IDE in debugger mode.
183+
184+
1. Open CCS and create a target configuration for the MSPM33C321A using the
185+
on-board XDS110 debug probe.
186+
2. Launch a projectless debug session (``Run`` > ``Debug Configurations`` >
187+
``Code Composer Studio - Device Debugging``).
188+
3. Connect to the MSPM33C321A core.
189+
4. Load the ``build/zephyr/zephyr.elf`` file via ``Run`` > ``Load`` >
190+
``Load Program...``.
96191

97192
Debugging
98193
=========
99194

100-
You can debug an application using TI Code Composer Studio IDE as described in the flashing
101-
section above. The debugger provides full visibility into the device state, registers,
102-
memory, and supports common debugging features like breakpoints, watchpoints, and step-by-step
103-
execution.
195+
You can debug an application using OpenOCD with the ``west debug`` command:
196+
197+
.. zephyr-app-commands::
198+
:zephyr-app: samples/basic/blinky
199+
:board: lp_mspm33c321a
200+
:goals: debug
201+
202+
This launches a GDB session connected to the MSPM33C321A via the XDS110 debugger,
203+
providing full visibility into device state, registers, memory, and support for
204+
breakpoints, watchpoints, and step-by-step execution.
205+
206+
Debugging with Code Composer Studio
207+
-------------------------------------
208+
209+
TI `Code Composer Studio`_ can also be used for debugging. Load the
210+
``build/zephyr/zephyr.elf`` file through the CCS debug session to get full
211+
source-level debugging with register, memory, and peripheral views.
212+
213+
Recovery
214+
========
215+
216+
The custom OpenOCD build included in the workspace provides device recovery
217+
commands accessible through the OpenOCD telnet interface or command line:
218+
219+
- **Factory Reset** — restores device to factory state:
220+
221+
.. code-block:: console
222+
223+
$ <workspace>/openocd/src/openocd -s <workspace>/openocd/tcl \
224+
-f board/ti_mspm33_launchpad.cfg -c "init; mspm33_factory_reset; shutdown"
225+
226+
- **Mass Erase** — erases all flash memory:
227+
228+
.. code-block:: console
229+
230+
$ <workspace>/openocd/src/openocd -s <workspace>/openocd/tcl \
231+
-f board/ti_mspm33_launchpad.cfg -c "init; mspm33_mass_erase; shutdown"
104232
105233
References
106234
**********
235+
236+
.. target-notes::
237+
238+
.. _TI LP_MSPM33C321A Product Page:
239+
https://www.ti.com/tool/LP-MSPM33C321A
240+
241+
.. _MSPM33C321A Datasheet:
242+
https://www.ti.com/product/MSPM33C321A
243+
244+
.. _MSPM33C321A TRM:
245+
https://www.ti.com/lit/ug/slau962/slau962.pdf
246+
247+
.. _Code Composer Studio:
248+
https://www.ti.com/tool/CCSTUDIO

boards/ti/lp_mspm33c321a/lp_mspm33c321a.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,11 @@ ram: 256
1010
flash: 1024
1111
supported:
1212
- gpio
13+
- uart
14+
- spi
15+
- i2c
16+
- adc
17+
- counter
18+
- dma
19+
- pinctrl
1320
vendor: ti

0 commit comments

Comments
 (0)