MSPM0 SDK Examples Guide

1. Introduction

The MSPM0 SDK is packaged with a wide selection of code examples to enable engineers to develop applications on Texas Instruments’ MSPM0 family of microcontrollers.

The examples folder is divided into RTOS and non-RTOS subfolders (currently only non-RTOS is supported). These folders contain examples for each LaunchPad and are organized based on function with lower-level Driverlib examples, higher-level TI Drivers examples, and examples for middleware such as GUI Composer, LIN, IQMath, and others.

Some examples support SysConfig to simplify the device configuration and accelerate software development. Refer to the SDK QuickStart guide for more details on how to get started using SysConfig, and look for the SysConfig symbol image0 in the sections below.

2. MSPM0 SDK Examples

2.1 Demos

The MSPM0 SDK includes several demos to showcase the functionalities of various devices.

Each demo is packaged with its own documentation, full source code, and project files for different supported IDEs and compilers, making the demos easy to use.

Stay tuned for more examples and functionality.

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

blood_pressure_monitor

Blood Pressure Monitor demos

N

Y

N

N

bq769x2_control_i2c

Demonstrate BQ769x2 control through I2C

N

image1

N

N

dualray_smoke_detector

Dualray smoke detector demo

N

image2

N

N

lcd_multi_port

1-wire target emulating a EEPROM interface

image3

N

N

N

lcd_single_port

1-wire target emulating a EEPROM interface

image4

image5

N

N

one_wire

1-wire target emulating a EEPROM interface

N

image6

N

N

out_of_box

Out of Box experience for MSPM0 LaunchPads

Y

Y

Y

N

pir_motion_detection

PIR Motion Detection using integrated OPA for the signal chain

N

image7

N

N

pulse_oximeter

Pulse oximeter demos

N

image8

N

N

2.2 DriverLib

DriverLib is a set of low level drivers providing an API for accessing MSPM0 registers and full device functionality.

The examples below use the Driverlib API to demonstrate the device functionality and range from simple use cases such as toggling a GPIO output pin to more complex use cases where multiple device peripherals are used.

Each example is packaged with its own documentation, full source code, and project files for different supported IDEs and compilers, making the examples easy to use.

2.2.1 AES Accelerator (AES)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

aes_cbc_256_enc_dec

AES256 CBC encryption and decryption example

image9

N

N

N

aes_cfb_256_decrypt

AES CFB 256 bit decryption example

image10

N

N

N

aes_ofb_128_encrypt

AES OFB 128 bit encryption example

image11

N

N

N

2.2.2 AESADV

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

aesadv_ecb_256_encrypt

Performs 256-bit AES ECB encryption using the on-board AESADV engine with a software wrapper

N

N

N

Y

2.2.3 Analog-to-Digital Converter (ADC)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

adc12_14bit_resolution

ADC12 conversion at maximum frequency using DMA with hardware averaging enabled

image12

image13

image14

image15

adc12_internal_temp_sensor_mathacl

ADC12 samples internal temperature sensor and converts reading to Celsius and Fahrenheit degrees

image16

N

N

N

adc12_max_freq_dma

ADC12 conversion at maximum frequency using DMA

image17

image18

image19

image20

adc12_max_freq_dma_8bit

ADC12 conversion at maximum frequency using DMA in 8 bit resolution

image21

image22

image23

image24

adc12_monitor_supply

ADC12 monitors voltage supply channel

image25

image26

image27

image28

adc12_sequence_conversion

Demonstrate configuring ADC to trigger sequence of conversions on 4 different channels

image29

image30

N

image31

adc12_simultaneous_trigger_event

Dual ADC12 conversion triggered by a Timer event

image32

N

N

N

adc12_simultaneous_trigger_event_stop

Dual ADC12 conversion triggered by a Timer event while in STOP mode

image33

N

N

N

adc12_single_conversion

ADC12 simple single conversion triggered by software

image34

image35

image36

image37

adc12_single_conversion_vref_external

ADC12 single conversion triggered by software using external reference

image38

image39

N

image40

adc12_single_conversion_vref_internal

ADC12 single conversion triggered by software using internal VREF

image41

image42

image43

image44

adc12_triggered_by_timer_event

ADC12 conversion triggered by a Timer event

image45

image46

image47

image48

adc12_triggered_by_timer_event_stop

ADC12 conversion triggered by a Timer event while in STOP mode

image49

image50

image51

image52

adc12_window_comparator

ADC12 single conversion in repeat mode using window comparator feature

image53

image54

image55

image56

2.2.4 CRCP

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

crcp_calculate_checksum

CRCP16 checksum calculation of a memory block

N

N

N

image57

crcp_calculate_checksum_dma

CRCP16 checksum calculation of a memory block using DMA block transfer

N

N

N

image58

2.2.5 Comparator (COMP)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

comp_analog_filter

Comparator using external inputs with hysteresis and output analog filter

image59

image60

N

image61

comp_dac_to_timer_event

Comparator output using 8-bit DAC triggers a timer event to measure timing

image62

image63

N

image64

comp_hs_dac_vref_external

Comparator in high-speed mode using 8-bit DAC with external VREF

image65

image66

N

image67

comp_hs_tima_pwm_fault

Comparator in high-speed mode triggers a TIMA fault

image68

N

N

N

comp_lp_dac_vref_internal

Comparator in low-power mode using 8-bit DAC with internal VREF

image69

N

N

N

2.2.6 Controller Area Network (CAN)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

mcan_loopback

MCAN transmits and receives messages using loopback mode

image70

N

N

N

mcan_message_rx

Example configured to receive CAN and CAN-FD frames

image71

N

N

N

mcan_message_rx_tcan114x

Example configured to receive CAN and CAN-FD frames using BOOSTXL-TCAN1145 boosterpack.

image72

N

N

N

mcan_multi_message_tx

CAN-FD transmits two messages with unique ID on GPIO interrupt

image73

N

N

N

mcan_multi_message_tx_tcan114x

CAN-FD transmits two messages with unique ID on GPIO interrupt using BOOSTXL-TCAN1145 boosterpack.

image74

N

N

N

mcan_single_message_tx

CAN-FD transmits a single message on GPIO interrupt

image75

N

N

N

2.2.7 Cyclic Redundancy Check (CRC)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

crc_calculate_checksum

CRC checksum calculation of a memory block

image76

image77

image78

N

crc_calculate_checksum_dma

CRC32 checksum calculation of a memory block using DMA block transfer

image79

image80

N

N

2.2.8 Digital-to-Analog Converter (DAC)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

dac12_dma_sampletimegen

DAC12 using DMA with sample time generator to generate sine wave

image81

N

N

N

dac12_fifo_sampletimegen

DAC12 sending repetitive signal using FIFO and sample timer generator

image82

N

N

N

dac12_fifo_timer_event

DAC12 sending a sawtooth signal using FIFO and triggered by a Timer event

image83

N

N

N

dac12_fixed_voltage_vref_internal

DAC12 setting a fixed voltage output

image84

N

N

N

2.2.9 Direct Memory Access (DMA)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

dma_block_transfer

DMA copies from Flash main memory to SRAM memory

image85

image86

image87

image88

dma_fill_data

DMA memory fill of SRAM using DMA

image89

image90

N

image91

dma_table_transfer

DMA using Table mode with DMA

image92

image93

N

image94

2.2.10 Events Manager

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

event_input_triggers_output

Event configuration to toggle LED when switch is pressed

image95

image96

image97

image98

2.2.11 GPIO

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

gpio_input_capture

GPIO triggers interrupt by input capture pin

image99

image100

image101

image102

gpio_simultaneous_interrupts

Demonstrates how to simultaneously service three GPIO interrupts

image103

N

N

N

gpio_software_poll

GPIO output is set based on polled input

image104

image105

image106

image107

gpio_toggle_output

GPIO toggling an output pin

image108

image109

image110

image111

gpio_toggle_output_cpp

GPIO toggling output pins using C++

image112

image113

N

image114

gpio_toggle_output_hiz

GPIO toggling an ouputput pin configured as Hi-Z

image115

image116

image117

image118

2.2.12 General-Purpose Amplifier (GPAMP)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

gpamp_buffer_to_adc

GPAmp configured in buffer mode with output to ADC

image119

image120

N

N

gpamp_general_purpose_rri

GPAmp configured in general purpose Rail-to-Rail mode

image121

image122

N

N

2.2.13 IWDT

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

iwdt_periodic_reset

Periodic reset of the indepedent watchdog timer in LFSS.

N

N

N

image123

2.2.14 Inter-Integrated Circuit (I2C)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

i2c_controller_rw_multibyte_fifo_interrupts

I2C Controller reading and writing multiple bytes using interrupts with FIFO

image124

image125

image126

image127

i2c_controller_rw_multibyte_fifo_poll

I2C Controller reading and writing multiple bytes polling FIFO

image128

image129

image130

image131

i2c_controller_target_dynamic_switching

I2C dynamic switching between Controller and Target modes

image132

image133

image134

image135

i2c_multicontroller_arbitration

I2C Controller detecting arbitration error

image136

image137

image138

image139

i2c_target_rw_multibyte_fifo_interrupts

I2C Target reading and writing multiple bytes using interrupts

image140

image141

image142

image143

i2c_target_rw_multibyte_fifo_interrupts_stop

I2C Target reading and writing multiple bytes using interrupts while in STOP mode

image144

image145

image146

image147

i2c_target_rw_multibyte_fifo_poll

I2C Target reading and writing multiple bytes polling FIFO

image148

image149

image150

image151

2.2.15 LCD

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

lcd_write_memory

Write characters to onboard LCD.

N

N

N

image152

2.2.16 Math Accelerator (MATHACL)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

mathacl_mpy_div_op

MATHACL implementation of trigonometric functions

image153

N

N

N

mathacl_trig_op

MATHACL implementation of trigonometric functions

image154

N

N

N

2.2.17 Non-Volatile Memory (FLASHCTL)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

flashctl_blank_verify

Implementation of Flash Blank Verify command

image155

image156

image157

image158

flashctl_dynamic_memory_protection

Flash configured with dynamic protection

image159

image160

image161

image162

flashctl_ecc_error_injection

Flash ECC testing and SEC and DED error detection

image163

N

N

image164

flashctl_multiple_size_read_verify

Implementation of Flash read verify commands on multiple data sizes, with and without ECC

image165

image166

image167

image168

flashctl_multiple_size_write

Flash writing of different size data

image169

image170

image171

image172

flashctl_nonmain_memory_write

Read-write of Non-Main Flash memory

image173

image174

image175

N

flashctl_program_with_ecc

Flash writing of different size data

image176

N

N

image177

2.2.18 Operational Amplifier (OPA)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

opa_burnout_current_source_to_adc

OPA in buffer mode enabling burnout current source to ADC

image178

image179

N

N

opa_dac8_output_buffer

OPA in output buffer mode using 8-bit DAC

image180

image181

N

N

opa_general_purpose_rri

OPA in general purpose mode with Rail-to-Rail configuration

image182

image183

N

N

opa_inverting_pga_with_dac

OPA in inverting PGA configuration using DAC12 as bias

image184

N

N

N

opa_non_inverting_pga

OPA in non-inverting PGA configuration

image185

image186

N

N

opa_signal_chain_to_adc

Two OPAs configured in TIA and PGA, connected to ADC

image187

N

N

N

2.2.19 Other

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

cinit_bypass

Bypass CINIT skipping variable initialization

image188

image189

image190

image191

empty

Empty start-up project using DriverLib

image192

image193

image194

image195

empty_cpp

Empty C++ start-up project using DriverLib

image196

image197

N

image198

empty_driverlib_src

Empty start-up project using DriverLib

image199

image200

image201

image202

empty_library

Empty start-up library project using DriverLib

Y

Y

Y

Y

empty_non_sysconfig

Empty, non-SysConfig, start-up project using DriverLib

Y

Y

Y

Y

nvic_interrupt_disable

NVIC used to demonstrate best approach to disable interrupts

image203

image204

image205

image206

nvic_interrupt_grouping

NVIC configuration and use of interrupt grouping

image207

image208

image209

image210

sram_parity

Initializes and uses Parity SRAM

image211

N

N

image212

systick_periodic_timer

SysTick generates periodic interrupt

image213

image214

N

image215

2.2.20 Real-Time Clock (RTC)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

rtc_a_tamper_timestamp_event

Generates a time stamp event on RTC_A upon tamper detection

N

N

N

image216

rtc_calendar_alarm_standby

RTC sets calendar alarm and toggles GPIO when alarm is triggered

image217

N

N

N

rtc_offset_calibration_lfxt

RTC offset correction of crystal

image218

N

N

N

rtc_periodic_alarm_lfosc_standby

RTC implementation of periodic alarm in STANDBY using LFOSC

image219

N

N

N

rtc_periodic_alarm_lfxt_standby

RTC implementation of periodic alarm in STANDBY using LFXT

image220

N

N

N

2.2.21 Scratchpad

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

scratchpad_erase_on_tamper

Erases scratchpad data upon detection of tamper

N

N

N

image221

scratchpad_retain_on_vdd_loss

Retains scratchpad data on loss of VDD power.

N

N

N

image222

2.2.22 Serial Peripheral Interface (SPI)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

spi_controller_command_data_control

SPI Controller transmit using command data (CD) control

image223

image224

image225

image226

spi_controller_echo_interrupts

SPI Controller transmits data using Motorola format

image227

image228

N

image229

spi_controller_fifo_dma_interrupts

SPI Controller reading and writing multiple bytes using FIFO and DMA

image230

image231

N

N

spi_controller_internal_loopback_poll

SPI Controller with internal loopback using polling

image232

image233

image234

image235

spi_controller_multibyte_fifo_poll

SPI Controller reading and writing multiple bytes polling FIFO

image236

image237

image238

image239

spi_controller_register_format

SPI Controller transmit and read data using register format

image240

image241

image242

image243

spi_controller_repeated_fifo_dma_interrupts

SPI Controller reading and writing multiple bytes using FIFO and DMA every second

image244

image245

N

image246

spi_peripheral_echo_interrupts

SPI Peripheral echoes data using Motorola format

image247

image248

image249

image250

spi_peripheral_fifo_dma_interrupts

SPI Peripheral reading and writing multiple bytes using FIFO and DMA

image251

image252

N

N

spi_peripheral_multibyte_fifo_poll

SPI Peripheral reading and writing multiple bytes polling FIFO

image253

image254

image255

image256

spi_peripheral_register_format

SPI Peripheral transmit and read data using register format

image257

image258

image259

image260

spi_peripheral_repeated_fifo_dma_interrupts

SPI Peripheral reading and writing multiple bytes using FIFO and DMA

image261

image262

N

image263

2.2.23 System Controller (SYSCTL)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

sysctl_frequency_clock_counter

Monitor SYSOSC via Frequency Clock Counter (FCC)

image264

image265

image266

image267

sysctl_hfxt_run

Sets external HFXT as source to HSCLK and MCLK (48MHz)

image268

N

N

image269

sysctl_lfxt_standby

Sets LFXT as source to LFCLK (32kHz) and power policy in STANDBY0

image270

N

N

image271

sysctl_mclk_syspll

Sets MCLK to run from SYSPLL (80MHz)

image272

N

N

N

sysctl_power_policy_sleep_to_standby

SYSCTL switches between SLEEP mode and STANDBY modes

image273

image274

image275

image276

sysctl_power_policy_sleep_to_stop

SYSCTL switches between SLEEP mode and STOP modes

image277

image278

image279

image280

sysctl_shutdown

Show correct wake-up mechanism after SHUTDOWN vs STOP, STANDBY and SLEEP

image281

image282

image283

image284

2.2.24 Tamper IO

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

tamperio_heartbeat

Configures a TamperIO pin to continuously output a heartbeat

N

N

N

image285

2.2.25 Timer - Advanced (TIMA)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

tima_timer_mode_periodic_repeat_count

TimerA in periodic mode using repeat-count feature

image286

N

image287

image288

tima_timer_mode_pwm_dead_band

TimerA outputs PWM signals with dead band insertion

image289

N

image290

image291

tima_trigger_fail_mechanism

TimerA demonstrating fault detection

image292

N

image293

image294

2.2.26 Timer - General Purpose (TIMG)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

timg_32bit_timer_mode_periodic_sleep

32-bit timer in periodic mode while device is in SLEEP mode

image295

N

N

N

timg_32bit_timer_mode_pwm_edge_sleep

32-bit timer in PWM edge aligned mode while device is in SLEEP mode

image296

N

N

N

timg_qei_mode

TimerG uses QEI to decode relative position output of a quadrature encoder

image297

N

image298

N

2.2.27 Timer - Generic (TIMx)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

timx_timer_mode_capture_duty_and_period

Timer calculates period and duty cycle

image299

image300

image301

image302

timx_timer_mode_capture_edge_capture

Timer edge time detection using Timer capture mode

image303

image304

image305

image306

timx_timer_mode_compare_edge_count

Timer edge counting capability using compare mode

image307

image308

image309

image310

timx_timer_mode_one_shot_standby

Timer in one-shot mode while device is in STANDBY mode

image311

image312

image313

image314

timx_timer_mode_periodic_sleep

Timer in periodic mode while device is in SLEEP mode

image315

image316

image317

image318

timx_timer_mode_periodic_standby

Timer in periodic mode while device is in STANDBY mode

image319

image320

image321

image322

timx_timer_mode_periodic_stop

Timer in periodic mode while device is in STOP mode

image323

image324

image325

image326

timx_timer_mode_pwm_center_stop

Timer in PWM center aligned mode while device is in STOP mode

image327

image328

image329

image330

timx_timer_mode_pwm_cross_trigger_stop_restore

Timer in PWM mode after coming out of STOP with retention in SW

image331

N

N

N

timx_timer_mode_pwm_edge_sleep

Timer in PWM edge aligned mode while device is in SLEEP mode

image332

image333

image334

image335

timx_timer_mode_pwm_edge_sleep_shadow

Timer updating PWM duty cycle using shadow load feature

image336

image337

image338

image339

2.2.28 True Random Number Generator (TRNG)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

trng_sample

TRNG sampling to fill a buffer with random data

image340

N

N

N

trng_sample_stop_restore

TRNG sample random data after coming out of STOP with retention in SW

image341

N

N

N

2.2.29 Universal Asynchronous Receiver-Transmitter (UART)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

uart_echo_interrupts_standby

UART RX/TX echo using interrupts while device is in STANDBY mode

image342

image343

image344

image345

uart_extend_irda_receive_packet

UART Extend using IrDA encoding, send packet via UART

image346

N

N

N

uart_extend_irda_send_packet

UART Extend using IrDA encoding, send packet via UART

image347

N

N

N

uart_extend_manchester_echo

UART Extend using Manchester encoding, echo received packet

image348

image349

image350

image351

uart_extend_manchester_send_packet

UART Extend using Manchester encoding and decoding, send a packet

image352

image353

image354

image355

uart_external_loopback_interrupt

UART RX/TX external loopback using interrupts

image356

image357

image358

image359

uart_internal_loopback_standby_restore

UART internal loopback after coming out of STANDBY with retention in SW

image360

N

N

N

uart_rs485_receive_packet

Demonstrate UART in RS485 mode, receive a packet

image361

N

N

N

uart_rs485_send_packet

Demonstrate UART in RS485 mode, send a packet

image362

N

N

N

uart_rw_multibyte_fifo_poll

UART RX/TX using FIFOs with polling

image363

image364

image365

image366

uart_rx_hw_flow_control

UART RX using HW flow control

image367

image368

image369

image370

uart_rx_multibyte_fifo_dma_interrupts

UART RX using a DMA trigger

image371

image372

N

image373

uart_tx_console_multibyte_repeated_fifo_dma

UART TX to a console using a continous DMA trigger

image374

image375

N

image376

uart_tx_hw_flow_control

UART TX using hardware flow control

image377

image378

image379

image380

uart_tx_multibyte_fifo_dma_interrupts

UART TX using a DMA trigger

image381

image382

N

image383

2.2.30 Window Watchdog Timer (WWDT)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

wwdt_interval_timer_lfosc_standby

WWDT interval timer mode using LFOSC while device is in STANDBY mode

image384

image385

image386

image387

wwdt_interval_timer_lfxt_standby

WWDT interval timer mode using LFXT while device is in STANDBY mode

image388

N

N

image389

wwdt_window_mode_periodic_reset

WWDT Window watchdog mode with periodic reset

image390

image391

image392

image393

2.3 TI-Drivers

TI Drivers provide a robust set of intuitive, functional APIs that offer portable, feature-rich access to peripherals.

TI-Drivers for MSPM0 are under development, but the examples below provide a glimpse of expected functionality.

2.3.1 FreeRTOS

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

adc_singlechannel/freertos

Get the samples from the configured ADC channel and print them on the console using UART

Y

N

N

N

gpiointerrupt/freertos

Toggles the LED(s) using a GPIO pin interrupt

Y

N

N

N

i2c_tmp/freertos

Read temperature from Tmp117 Sensor using I2C

Y

N

N

N

spi_controller/freertos

Demonstrates the SPI driver in controller mode to communicate with another LP_MSPM0G3507 running the spi_peripheral example

Y

N

N

N

spi_peripheral/freertos

Demonstrates the SPI driver in peripheral mode to communicate with another LP_MSPM0G3507 running the spi_controller example

Y

N

N

N

uart_callback/freertos

UART simple echo using callback

Y

Y

N

N

uart_echo/freertos

UART simple echo

Y

Y

N

N

2.3.2 No RTOS

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

uart_echo/nortos

UART simple echo

Y

N

N

N

2.4 Battery Gauge

The MSPM0 SDK includes source code and examples showing the implementation of different battery gauge solutions. Documentation includes links to companion application reports describing the solutions in more detail.

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

gauge_level1

The level1 gauge approach utilizes the ADC to implement a low-cost voltage detection solution

N

Y

N

N

self_calibrate_current_detection

This example demonstrates a self-calibratable, high precision and low-cost current detection solution based on MSPM0 internal OPAs

N

Y

N

N

2.5 Boot Image Manager (BIM)

The MSPM0 SDK includes a boot image manager implementation to demonstrate how a user can verify integrity and authenticity of images loaded onto their device.

2.5.1 Customer Secure

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

customer_secure_code

Customer Secure Code based off MCUBoot

N

N

N

image394

customer_secure_image_with_bootloader

Sample GPIO toggle image for Customer Secure Code

N

N

N

image395

customer_secure_sample_image

Sample GPIO toggle image for Customer Secure Code

N

N

N

image396

2.5.2 Single Stage

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

bim_sample_image

Sample GPIO toggle image for BIM

image397

image398

N

N

boot_application

Boot Image Manager Using MCUBoot

image399

image400

N

N

2.6 Bootstrap Loader (BSL)

The bootstrap loader (BSL) provides a method to program and/or verify the device memory through a standard UART or I2C serial interface. Among its features, the BSL supports MAIN flash plugins to enable additional interfaces and functionality.

The MSPM0 SDK includes examples showing how to implement plugins and other BSL functionality in MAIN Flash.

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

bsl_can_flash_interface

Shows an implementation of a BSL CAN Flash interface

image401

N

N

N

bsl_host_mcu_to_mspm0g1x0x_g3x0x_target_can

Demonstrate how to program a MSPM0 MCU using a LP-MSPM0G3507 as host by BSL CAN interface.

image402

N

N

N

bsl_host_mcu_to_mspm0g1x0x_g3x0x_target_i2c

Demonstrate how to program a MSPM0 MCU using a LP-MSPM0G3507 as host by BSL I2C interface.

image403

N

N

N

bsl_host_mcu_to_mspm0g1x0x_g3x0x_target_spi

Demonstrate how to program a MSPM0 MCU using a LP-MSPM0G3507 as host by BSL SPI interface.

image404

N

N

N

bsl_host_mcu_to_mspm0g1x0x_g3x0x_target_uart

Demonstrate how to program a MSPM0 MCU using a LP-MSPM0G3507 as host by BSL UART interface.

image405

N

N

N

bsl_host_mcu_to_mspm0l11xx_l13xx_target_i2c

Demonstrate how to program a MSPM0L11xx_L13xx MCU using a LP-MSPM0L1306 as host by BSL I2C interface.

N

image406

N

N

bsl_host_mcu_to_mspm0l11xx_l13xx_target_spi

Demonstrate how to program a MSPM0L11xx_L13xx MCU using a LP-MSPM0L1306 as host by BSL SPI interface.

N

image407

N

N

bsl_host_mcu_to_mspm0l11xx_l13xx_target_uart

Demonstrate how to program a MSPM0L11xx_L13xx MCU using a LP-MSPM0L1306 as host by BSL UART interface.

N

image408

N

N

bsl_i2c_flash_interface

Shows an implementation of BSL I2C Flash interface

image409

image410

N

N

bsl_software_invoke_app_demo_can

Demonstrates an application request to reset the device and jump to the ROM bootloader (BSL).

image411

N

N

N

bsl_software_invoke_app_demo_i2c

Demonstrates an application request to reset the device and jump to the ROM bootloader (BSL).

image412

image413

N

N

bsl_software_invoke_app_demo_spi

Demonstrates an application request to reset the device and jump to the ROM bootloader (BSL).

image414

image415

N

N

bsl_software_invoke_app_demo_uart

Demonstrates an application request to reset the device and jump to the ROM bootloader (BSL).

image416

image417

N

N

bsl_spi_flash_interface

Shows an implementation of a BSL SPI Flash interface

image418

image419

N

N

bsl_uart_flash_interface

Shows an implementation of a BSL UART Flash interface

image420

image421

N

N

secondary_bsl_can

Implements a secondary bootloader in Main overriding the ROM BSL

image422

N

N

N

secondary_bsl_i2c

Implements a secondary bootloader in Main overriding the ROM BSL

image423

image424

N

N

secondary_bsl_spi

Implements a secondary bootloader in Main overriding the ROM BSL

image425

image426

N

N

secondary_bsl_uart

Implements a secondary bootloader in Main overriding the ROM BSL

image427

image428

N

N

2.7 CMSIS-DSP

The CMSIS DSP software library includes a comprehensive set of signal processing functions for use on Cortex-M MCUs.

The MSPM0 SDK includes examples showing how to get started using CMSIS DSP.

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

cmsis_dsp_empty

Empty example using CMSIS-DSP

image429

image430

N

N

cmsis_dsp_fft_q15

FFT of fixed point array using CMSIS-DSP

image431

image432

N

N

2.8 DALI

MSPM0 supports the DALI Protocol via the UART module. DALI (Digitally Addressable Lighting Interface) is a serial protocol for digital lighting control that allows for simple and efficient communication between various lighting application gear and controllers.

The MSPM0 SDK includes the source code and examples showing the implementation of supported solutions.

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

dali_led_demo

Demonstrates usage of DALI protocol with an LED control demo

N

image433

N

N

2.9 EEPROM

MSPM0 supports EEPROM emulation through its internal Flash. Compared to using an external serial EEPROM, EEPROM emulation using the internal Flash saves pin usage and cost.

The MSPM0 SDK includes a library and examples showing the implementation of supported solutions.

2.9.1 Type-A

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

eeprom_emulation_type_a

Demonstrates Type A EEPROM emulation to store non-volatile data

Y

Y

N

N

eeprom_emulation_type_a_test

Demonstrates a more detailed use case of Type A EEPROM emulation to store blocks of non-volatile data

Y

Y

N

N

2.9.2 Type-B

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

eeprom_emulation_type_b

Demonstrates Type B EEPROM emulation to store user data

Y

Y

N

N

eeprom_emulation_type_b_test

Demonstrates a more detailed use case of Type B EEPROM emulation to store user data

Y

Y

N

N

2.10 Energy Library

The MSPM0 SDK includes a collection of energy measurement examples designed to get you started quickly in testing and developing energy measurement applications.

Stay tuned for more examples and functionality coming soon.

2.10.1 TIDA_010243

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

TIDA_010243_SW

Firmware for 3 phase measurement using MSPM0G3507 and ADS131M0x

image434

N

N

N

2.11 GUI Composer

GUI Composer is a browser-based tool for developing PC-side HTML-based GUIs that can complement your embedded project or application.

The MSPM0 SDK includes a library and various examples showing the implementation of supported protocols.

2.11.1 Streaming Protocols

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

gc_simple_json

Demonstrates basic usage of GUI Composer communication using JSON-formatted strings

image435

image436

N

N

gc_simple_messagepack

Demonstrates basic usage of GUI Composer communication using MessagePack protocol

image437

image438

N

N

2.12 IQMath

IQMath is a collection of highly optimized and high-precision fixed-point mathematical functions.

The MSPM0 SDK includes IQMath support using simple C runtime-system (RTS) functions, and leveraging the MathAcl hardware accelerator.

2.12.1 Compiler RTS library

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

iqmath_rts_ops_test

Implements various fixed-point operations leveraging the RTS implementation of IQMath

image439

image440

N

N

2.12.2 MathACL

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

iqmath_mathacl_ops_test

Implements various fixed-point operations leveraging the MathACL implementation of IQMath

image441

N

N

N

2.13 RTOS Kernel

The MSPM0 SDK includes a collection of examples to test kernel functionality.

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

blink_led

Simple FreeRTOS LED blinky demo using two tasks

image442

image443

N

N

posix_demo

Simple Posix FreeRTOS blinky LED demo

image444

image445

N

N

2.14 LIN

The Local Interconnect Network (LIN) is a multipoint, low-cost, easily-implemented communication bus commonly used in automobiles.

The MSPM0 SDK includes easy-to-use examples for Commander and Responder.

2.14.1 Commander

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

lin_commander

Demonstrates basic implementation of LIN commander to transmit and receive LIN 2.0 packets using UART

image446

image447

image448

N

2.14.2 Responder

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

lin_responder

Demonstrates basic implementation of LIN responder to transmit and receive LIN 2.0 packets using UART

image449

image450

image451

N

2.15 Sensored Trap Hall Motor Control

The MSPM0 SDK includes examples to evaluate the sensored trap hall motor control library with the DRV8300DRGEEVM, DRV8311HEVM, DRV8316REVM, DRV8317HEVM, DRV8323RHEVM, DRV8328AEVM, DRV8329AEVM and DRV8353RHEVM. These firmware are designed for a GUI to make testing and evaluation quick for the user.

Stay tuned for more examples and functionality coming soon.

2.15.1 DRV8300

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

drv8300drgeevm-gui-firmware

Firmware for LP_MSPM0G3507 and drv8300drge EVM GUI

image452

N

N

N

2.15.2 DRV8311

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

drv8311hevm-gui-firmware

Firmware for LP_MSPM0G3507 and drv8311h EVM GUI

image453

N

N

N

2.15.3 DRV8316

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

drv8316revm-gui-firmware

Firmware for LP_MSPM0G3507 and DRV8316R EVM GUI

image454

N

N

N

2.15.4 DRV8317

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

drv8317hevm-gui-firmware

Firmware for LP_MSPM0G3507 and drv8317h EVM GUI

image455

N

N

N

2.15.5 DRV8323

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

drv8323rhevm-gui-firmware

Firmware for LP_MSPM0G3507 and drv8323rh EVM GUI

image456

N

N

N

2.15.6 DRV8328

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

drv8328aevm-gui-firmware

Firmware for LP_MSPM0G3507 and DRV8328A EVM GUI

image457

N

N

N

tida-010251-gui-firmware

Firmware for LP_MSPM0G1507 and DRV8328 motor driver

image458

N

N

N

2.15.7 DRV8329

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

drv8329aevm-gui-firmware

Firmware for LP_MSPM0G3507 and DRV8329A EVM GUI

image459

N

N

N

drv8329aevm-gui-firmware-MSPM0L1306

Firmware for LP_MSPM0L1306 and DRV8329A EVM GUI

N

image460

N

N

2.15.8 DRV8353

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

drv8353rhevm-gui-firmware

Firmware for LP_MSPM0G3507 and drv8353rh EVM GUI

image461

N

N

N

2.16 Sensorless FOC Motor Control

The MSPM0 SDK includes examples to evaluate the sensorless FOC motor control library with the DRV8323RS EVM. These firmware are designed for a GUI to make testing and evaluation quick for the user.

Stay tuned for more examples and functionality coming soon.

2.16.1 DRV8316

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

sensorless-foc_DRV8316

Sensorless FOC code for LP_MSPM0G3507

image462

N

N

N

2.16.2 DRV8323RS

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

sensorless-foc_DRV8323RS

Sensorless FOC code for LP_MSPM0G3507

image463

N

N

N

2.17 Brushed Motor Control

The MSPM0 SDK includes an example to evaluate the brushed motor control library with the DRV8706-Q1 EVM. This firmware was designed for a GUI to make testing and evaluation quick for the user.

Stay tuned for more examples and functionality coming soon.

2.17.1 DRV8706-Q1

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

drv8706s-q1evm-gui-firmware

Firmware for LP_MSPM0L1306 and DRV8706S-Q1 EVM GUI

N

image464

N

N

2.18 Stepper Motor Control

The MSPM0 SDK includes examples to evaluate the stepper motor control library with the DRV8411A and DRV8889-q1 EVM. These firmwares were designed for a GUI to make testing and evaluation quick for the user.

Stay tuned for more examples and functionality coming soon.

2.18.1 DRV8411A

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

drv8411aevm-gui-firmware

Firmware for LP_MSPM0L1306 and DRV8411AEVM GUI

N

image465

N

N

2.18.2 DRV8889-Q1

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

drv8889-q1evm-gui-firmware

Firmware for LP_MSPM0L1306 and DRV8889-Q1 EVM GUI

N

image466

N

N

2.19 Cookbook

The MSPM0 SDK Cookbook contains examples showing more complex functionality implemented with multiple peripherals.

The examples use DriverLib APIs, and includes full source code and documentation with detailed usage instructions.

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

adc_dma_ping_pong

Capture ADC data into 2 (ping-pong) buffers

image467

image468

N

N

adc_to_i2c_target

Sample ADC and respond to I2C commands sent by a controller

image469

image470

N

N

adc_to_pwm

Convert analog voltage to PWM

image471

image472

N

N

adc_to_spi_peripheral

Sample ADC and respond to SPI commands sent by a controller

image473

image474

N

N

adc_to_uart

Configures the ADC0 to trigger single conversion and send the ADC data through UART

image475

image476

N

N

can_to_i2c_controller_bridge

Bridge between CAN interface and I2C controller interface

image477

N

N

N

can_to_i2c_target_bridge

Bridge between CAN interface and I2C target interface

image478

N

N

N

can_to_spi_bridge

Bridge between CAN interface and SPI interface

image479

N

N

N

can_to_uart_bridge

Bridge between CAN interface and UART interface

image480

N

N

N

dac8_dma_function_generator

Generates waveform using DAC8 with the DMA

image481

image482

N

N

data_sensor_aggregator

This example reads all the sensors on the BP-BASSENSORSMKI using I2C then transmits all of the data through UART to the MSPM0.

image483

N

N

N

digital_mux

Emulate a digital mux with GPIO

N

image484

N

N

diode_matrix

Drive LEDs with fewer pins using diode matrix

N

image485

N

N

fir_low_pass_filter

Applies digital FIR low-pass filter to sampled ADC signals

image486

N

N

N

i2c_to_uart_bridge

I2C Target receives I2C transmissions and passes them on via UART

image487

N

N

N

iir_low_pass_filter

Applies digital IIR filter to sampled ADC signals

image488

N

N

N

io_expander_uart

Capture several GPIOs’ status, update and send the status to host through UART

N

image489

N

N

power_sequencing

This sub system allows for different pins/applications be turned on/off in a sequence as to not over load the device from simultaneous power consumption.

image490

image491

N

N

programmable_gain_amplifier_1

Use programmable gain amplifier to dynamically adjust gain

N

image492

N

N

programmable_gain_amplifier_2

Use programmable gain amplifier to dynamically adjust gain and capture values with integrated ADC

N

image493

N

N

pushbutton_change_pwm

This example demonstrates using the two switches on the MSPM0 Launchpad to change the period and duty cycle on TIMA1 PWM output channels CC0 and CC1.

image494

N

N

N

pwm_dac

Use a timer to create a PWM DAC

N

image495

N

N

pwm_led_driver

Create a pulsating LED effect using timers

image496

image497

N

N

signal_acquisition

OPA supports two different sensor input voltages and uses common ADC channel

image498

N

N

N

task_scheduler

A simple run to completion task scheduler

image499

image500

N

N

temp_sense_thermistor

Sample LaunchPad thermistor using integrated Op-Amp and ADC

N

image501

N

N

transimpedance_amplifier

Configure Op-amp in transimpedance amplifier topology

N

image502

N

N

two_opa_instrumentation_amplifier

Along with an external circuit this code amplifies the difference between two voltage inputs and outputs a single ended signal while rejecting the common-mode voltage.

image503

image504

N

N

uart_to_i2c_bridge

Translates UART packets to multiple I2C devices

image505

image506

N

N

uart_to_spi_bridge

UART device receives packets and passes them on or executes reads in SPI format

image507

N

N

N

2.20 PMBUS

PMBus is a protocol design to interface with power management devices. It uses the SMBus protocol as a base.

The MSPM0 SDK includes a ready-to-go example for using an MSPM0 devices as a PMBus controller for a TPS544B20 device.

2.20.1 Controller

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

pmbus_controller_tps544b20evm

Use MSPM0 to configure TPS544B20EVM over PMBus

image508

image509

N

N

2.21 SASI_SMOKE_DETECTOR

MSPM0 supports analog front ends for chambered or chamberless smoke detectors and air quality sensing solutions.

The MSPM0 SDK includes a software library and reference examples for smoke detection and air quality sensing.

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

air_quality_sensing

Implements an analog front end for air quality sensing

N

Y

N

N

sasi_smoke_detector

Implements an analog front end for smoke detectors

N

Y

N

N

2.22 SENT

The Single Edge Nibble Transmission (SENT) is a unidirectional communication standard used in automotive networks.

The MSPM0 SDK includes easy-to-use examples for transmitting a SENT frame.

2.22.1 Transmit

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

sent_transmit

Demonstrates basic implementation of SENT protocol

N

image510

N

N

2.23 SMBus

The System Management Bus (SMBus) is a single-ended simple two-wire bus for lightweight communication.

The MSPM0 SDK includes easy-to-use examples for Controller and Target.

2.23.1 Controller

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

smb_controller00_all_protocols

Demonstrates basic implementation of SMBus Controller testing all SMBus 2.0 protocols using I2C

image511

image512

N

N

smbus_controller_host_notify

Demonstrates implementation of SMBus Host Notify function on a Controller

image513

image514

N

N

2.23.2 Target

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

LP_MSPM0C1104

LP_MSPM0L2228

smb_target00_all_protocols

Demonstrates basic implementation of SMBus Target testing all SMBus 2.0 protocols using I2C

image515

image516

N

N

smbus_target_host_notify

Demonstrates implementation of SMBus Host Notify function on a Target

image517

image518

N

N