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

blood_pressure_monitor

Blood Pressure Monitor demos

N

Y

bq769x2_control_i2c

Demonstrate BQ769x2 control through I2C

N

image1

dualray_smoke_detector

Dualray smoke detector demo

N

image2

lcd_multi_port

1-wire target emulating a EEPROM interface

image3

N

lcd_single_port

1-wire target emulating a EEPROM interface

image4

N

one_wire

1-wire target emulating a EEPROM interface

N

image5

out_of_box

Out of Box experience for MSPM0 LaunchPads

Y

Y

pir_motion_detection

PIR Motion Detection using integrated OPA for the signal chain

N

image6

pulse_oximeter

Pulse oximeter demos

N

image7

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

aes_cbc_256_enc_dec

AES256 CBC encryption and decryption example

image8

N

aes_cfb_256_decrypt

AES CFB 256 bit decryption example

image9

N

aes_ofb_128_encrypt

AES OFB 128 bit encryption example

image10

N

2.2.2 Analog-to-Digital Converter (ADC)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

adc12_14bit_resolution

ADC12 conversion at maximum frequency using DMA with hardware averaging enabled

image11

image12

adc12_internal_temp_sensor_mathacl

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

image13

N

adc12_max_freq_dma

ADC12 conversion at maximum frequency using DMA

image14

image15

adc12_max_freq_dma_8bit

ADC12 conversion at maximum frequency using DMA in 8 bit resolution

image16

image17

adc12_monitor_supply

ADC12 monitors voltage supply channel

image18

image19

adc12_sequence_conversion

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

image20

image21

adc12_simultaneous_trigger_event

Dual ADC12 conversion triggered by a Timer event

image22

N

adc12_simultaneous_trigger_event_stop

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

image23

N

adc12_single_conversion

ADC12 simple single conversion triggered by software

image24

image25

adc12_single_conversion_vref_external

ADC12 single conversion triggered by software using external reference

image26

image27

adc12_single_conversion_vref_internal

ADC12 single conversion triggered by software using internal VREF

image28

image29

adc12_triggered_by_timer_event

ADC12 conversion triggered by a Timer event

image30

image31

adc12_triggered_by_timer_event_stop

ADC12 conversion triggered by a Timer event while in STOP mode

image32

image33

adc12_window_comparator

ADC12 single conversion in repeat mode using window comparator feature

image34

image35

2.2.3 Comparator (COMP)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

comp_analog_filter

Comparator using external inputs with hysteresis and output analog filter

image36

image37

comp_dac_to_timer_event

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

image38

image39

comp_hs_dac_vref_external

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

image40

image41

comp_hs_tima_pwm_fault

Comparator in high-speed mode triggers a TIMA fault

image42

N

comp_lp_dac_vref_internal

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

image43

N

2.2.4 Controller Area Network (CAN)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

mcan_loopback

MCAN transmits and receives messages using loopback mode

image44

N

mcan_message_rx

Example configured to receive CAN and CAN-FD frames

image45

N

mcan_message_rx_tcan114x

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

image46

N

mcan_multi_message_tx

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

image47

N

mcan_multi_message_tx_tcan114x

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

image48

N

mcan_single_message_tx

CAN-FD transmits a single message on GPIO interrupt

image49

N

2.2.5 Cyclic Redundancy Check (CRC)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

crc_calculate_checksum

CRC32 checksum calculation of a memory block

image50

image51

crc_calculate_checksum_dma

CRC32 checksum calculation of a memory block using DMA block transfer

image52

image53

2.2.6 Digital-to-Analog Converter (DAC)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

dac12_dma_sampletimegen

DAC12 using DMA with sample time generator to generate sine wave

image54

N

dac12_fifo_sampletimegen

DAC12 sending repetitive signal using FIFO and sample timer generator

image55

N

dac12_fifo_timer_event

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

image56

N

dac12_fixed_voltage_vref_internal

DAC12 setting a fixed voltage output

image57

N

2.2.7 Direct Memory Access (DMA)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

dma_block_transfer

DMA copies from Flash main memory to SRAM memory

image58

image59

dma_fill_data

DMA memory fill of SRAM using DMA

image60

image61

dma_table_transfer

DMA using Table mode with DMA

image62

image63

2.2.8 Events Manager

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

event_input_triggers_output

Event configuration to toggle LED when switch is pressed

image64

image65

2.2.9 GPIO

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

gpio_input_capture

GPIO triggers interrupt by input capture pin

image66

image67

gpio_simultaneous_interrupts

Demonstrates how to simultaneously service three GPIO interrupts

image68

N

gpio_software_poll

GPIO output is set based on polled input

image69

image70

gpio_toggle_output

GPIO toggling an output pin

image71

image72

gpio_toggle_output_cpp

GPIO toggling output pins using C++

image73

image74

gpio_toggle_output_hiz

GPIO toggling an ouputput pin configured as Hi-Z

image75

image76

2.2.10 General-Purpose Amplifier (GPAMP)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

gpamp_buffer_to_adc

GPAmp configured in buffer mode with output to ADC

image77

image78

gpamp_general_purpose_rri

GPAmp configured in general purpose Rail-to-Rail mode

image79

image80

2.2.11 Inter-Integrated Circuit (I2C)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

i2c_controller_rw_multibyte_fifo_interrupts

I2C Controller reading and writing multiple bytes using interrupts with FIFO

image81

image82

i2c_controller_rw_multibyte_fifo_poll

I2C Controller reading and writing multiple bytes polling FIFO

image83

image84

i2c_controller_target_dynamic_switching

I2C dynamic switching between Controller and Target modes

image85

image86

i2c_multicontroller_arbitration

I2C Controller detecting arbitration error

image87

image88

i2c_target_rw_multibyte_fifo_interrupts

I2C Target reading and writing multiple bytes using interrupts

image89

image90

i2c_target_rw_multibyte_fifo_interrupts_stop

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

image91

image92

i2c_target_rw_multibyte_fifo_poll

I2C Target reading and writing multiple bytes polling FIFO

image93

image94

2.2.12 Math Accelerator (MATHACL)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

mathacl_mpy_div_op

MATHACL multiply and divide using fixed point

image95

N

mathacl_trig_op

MATHACL implementation of trigonometric functions

image96

N

2.2.13 Non-Volatile Memory (FLASHCTL)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

flashctl_blank_verify

Implementation of Flash Blank Verify command

image97

image98

flashctl_dynamic_memory_protection

Flash configured with dynamic protection

image99

image100

flashctl_ecc_error_injection

Flash ECC testing and SEC and DED error detection

image101

N

flashctl_multiple_size_read_verify

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

image102

image103

flashctl_multiple_size_write

Flash writing of different size data

image104

image105

flashctl_nonmain_memory_write

Read-write of Non-Main Flash memory

image106

image107

flashctl_program_with_ecc

Flash programming with ECC

image108

N

2.2.14 Operational Amplifier (OPA)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

opa_burnout_current_source_to_adc

OPA in buffer mode enabling burnout current source to ADC

image109

image110

opa_dac8_output_buffer

OPA in output buffer mode using 8-bit DAC

image111

image112

opa_general_purpose_rri

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

image113

image114

opa_inverting_pga_with_dac

OPA in inverting PGA configuration using DAC12 as bias

image115

N

opa_non_inverting_pga

OPA in non-inverting PGA configuration

image116

image117

opa_signal_chain_to_adc

Two OPAs configured in TIA and PGA, connected to ADC

image118

N

2.2.15 Other

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

cinit_bypass

Bypass CINIT skipping variable initialization

image119

image120

empty

Empty start-up project using DriverLib

image121

image122

empty_cpp

Empty C++ start-up project using DriverLib

image123

image124

empty_driverlib_src

Empty start-up project using DriverLib

image125

image126

empty_library

Empty start-up library project using DriverLib

Y

Y

nvic_interrupt_disable

NVIC used to demonstrate best approach to disable interrupts

image127

image128

nvic_interrupt_grouping

NVIC configuration and use of interrupt grouping

image129

image130

sram_parity

Initializes and uses Parity SRAM

image131

N

systick_periodic_timer

SysTick generates periodic interrupt

image132

image133

2.2.16 Real-Time Clock (RTC)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

rtc_calendar_alarm_standby

RTC sets calendar alarm and toggles GPIO when alarm is triggered

image134

N

rtc_offset_calibration_lfxt

RTC offset correction of crystal

image135

N

rtc_periodic_alarm_lfosc_standby

RTC implementation of periodic alarm in STANDBY using LFOSC

image136

N

rtc_periodic_alarm_lfxt_standby

RTC implementation of periodic alarm in STANDBY using LFXT

image137

N

2.2.17 Serial Peripheral Interface (SPI)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

spi_controller_command_data_control

SPI Controller transmit using command data (CD) control

image138

image139

spi_controller_echo_interrupts

SPI Controller transmits data using Motorola format

image140

image141

spi_controller_internal_loopback_poll

SPI Controller with internal loopback using polling

image142

image143

spi_controller_multibyte_fifo_dma_interrupts

SPI Controller reading and writing multiple bytes using FIFO and DMA

image144

image145

spi_controller_multibyte_fifo_poll

SPI Controller reading and writing multiple bytes polling FIFO

image146

image147

spi_controller_register_format

SPI Controller transmit and read data using register format

image148

image149

spi_controller_repeated_multibyte_fifo_dma_interrupts

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

image150

image151

spi_peripheral_echo_interrupts

SPI Peripheral echoes data using Motorola format

image152

image153

spi_peripheral_multibyte_fifo_dma_interrupts

SPI Peripheral reading and writing multiple bytes using FIFO and DMA

image154

image155

spi_peripheral_multibyte_fifo_poll

SPI Peripheral reading and writing multiple bytes polling FIFO

image156

image157

spi_peripheral_register_format

SPI Peripheral transmit and read data using register format

image158

image159

spi_peripheral_repeated_multibyte_fifo_dma_interrupts

SPI Peripheral reading and writing multiple bytes using FIFO and DMA

image160

image161

2.2.18 System Controller (SYSCTL)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

sysctl_frequency_clock_counter

Monitor SYSOSC via Frequency Clock Counter (FCC)

image162

N

sysctl_hfxt_run

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

image163

N

sysctl_lfxt_standby

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

image164

N

sysctl_mclk_syspll

Sets MCLK to run from SYSPLL (80MHz)

image165

N

sysctl_power_policy_sleep_to_standby

SYSCTL switches between SLEEP mode and STANDBY modes

image166

image167

sysctl_power_policy_sleep_to_stop

SYSCTL switches between SLEEP mode and STOP modes

image168

image169

sysctl_shutdown

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

image170

image171

2.2.19 Timer - Advanced (TIMA)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

tima_timer_mode_periodic_repeat_count

TimerA in periodic mode using repeat-count feature

image172

N

tima_timer_mode_pwm_dead_band

TimerA outputs PWM signals with dead band insertion

image173

N

tima_trigger_fail_mechanism

TimerA demonstrating fault detection

image174

N

2.2.20 Timer - General Purpose (TIMG)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

timg_32bit_timer_mode_periodic_sleep

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

image175

N

timg_32bit_timer_mode_pwm_edge_sleep

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

image176

N

timg_qei_mode

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

image177

N

2.2.21 Timer - Generic (TIMx)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

timx_timer_mode_capture_duty_and_period

Timer calculates period and duty cycle

image178

image179

timx_timer_mode_capture_edge_capture

Timer edge time detection using Timer capture mode

image180

image181

timx_timer_mode_compare_edge_count

Timer edge counting capability using compare mode

image182

image183

timx_timer_mode_one_shot_standby

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

image184

image185

timx_timer_mode_periodic_sleep

Timer in periodic mode while device is in SLEEP mode

image186

image187

timx_timer_mode_periodic_standby

Timer in periodic mode while device is in STANDBY mode

image188

image189

timx_timer_mode_periodic_stop

Timer in periodic mode while device is in STOP mode

image190

image191

timx_timer_mode_pwm_center_stop

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

image192

image193

timx_timer_mode_pwm_cross_trigger_stop_restore

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

image194

N

timx_timer_mode_pwm_edge_sleep

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

image195

image196

timx_timer_mode_pwm_edge_sleep_shadow

Timer updating PWM duty cycle using shadow load feature

image197

image198

2.2.22 True Random Number Generator (TRNG)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

trng_sample

TRNG sampling to fill a buffer with random data

image199

N

trng_sample_stop_restore

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

image200

N

2.2.23 Universal Asynchronous Receiver-Transmitter (UART)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

uart_echo_interrupts_standby

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

image201

image202

uart_extend_irda_receive_packet

UART Extend using IrDA encoding, send packet via UART

image203

N

uart_extend_irda_send_packet

UART Extend using IrDA encoding, send packet via UART

image204

N

uart_extend_manchester_echo

UART Extend using Manchester encoding, echo received packet

image205

image206

uart_extend_manchester_send_packet

UART Extend using Manchester encoding and decoding, send a packet

image207

image208

uart_external_loopback_interrupt

UART RX/TX external loopback using interrupts

image209

image210

uart_internal_loopback_standby_restore

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

image211

N

uart_rs485_receive_packet

Demonstrate UART in RS485 mode, receive a packet

image212

N

uart_rs485_send_packet

Demonstrate UART in RS485 mode, send a packet

image213

N

uart_rw_multibyte_fifo_poll

UART RX/TX using FIFOs with polling

image214

image215

uart_rx_hw_flow_control

UART RX using HW flow control

image216

image217

uart_rx_multibyte_fifo_dma_interrupts

UART RX using a DMA trigger

image218

image219

uart_tx_console_multibyte_repeated_fifo_dma

UART TX to console using a continuous DMA Triggers

image220

image221

uart_tx_hw_flow_control

UART TX using hardware flow control

image222

image223

uart_tx_multibyte_fifo_dma_interrupts

UART TX using a DMA trigger

image224

image225

2.2.24 Window Watchdog Timer (WWDT)

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

wwdt_interval_timer_lfosc_standby

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

image226

image227

wwdt_interval_timer_lfxt_standby

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

image228

N

wwdt_window_mode_periodic_reset

WWDT Window watchdog mode with periodic reset

image229

image230

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

adc_singlechannel

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

Y

N

gpiointerrupt

Toggles the LED(s) using a GPIO pin interrupt

Y

N

i2c_tmp

Read temperature from Tmp117 Sensor using I2C

Y

N

uart_callback

UART simple echo using callback

Y

Y

uart_echo

UART simple echo

Y

Y

2.3.2 No RTOS

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

uart_echo/nortos

UART simple echo

Y

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

gauge_level1

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

N

Y

gauge_level2

The level2 gauge solution utilizes the ADC and OPAs on MSPM0 for high precison voltage and current detection

N

Y

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

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.

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

bim_sample_image

Sample GPIO toggle image for BIM

image231

image232

boot_application

Boot Image Manager Using MCUBoot

image233

image234

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

bsl_can_flash_interface

Shows an implementation of a BSL CAN Flash interface

Y

N

bsl_host_mcu_can

Shows an implementation of a BSL host utilizing CAN interface

Y

N

bsl_host_mcu_i2c_to_m0g_target

Shows an implementation of BSL I2C Flash interface with MSPM0G as host to MSPM0G target

image235

N

bsl_host_mcu_i2c_to_m0l_target

Shows an implementation of BSL I2C Flash interface with MSPM0G as host to MSPM0L target

image236

N

bsl_host_mcu_spi

Shows an implementation of a BSL host utilizing SPI interface

Y

N

bsl_host_mcu_uart_to_m0g_target

Shows an implementation of BSL UART Flash interface with MSPM0G as host to MSPM0G target

image237

N

bsl_host_mcu_uart_to_m0l_target

Shows an implementation of BSL UART Flash interface with MSPM0G as host to MSPM0L target

image238

N

bsl_i2c_flash_interface

Shows an implementation of BSL I2C Flash interface

image239

image240

bsl_software_invoke

Jump to ROM bootloader on application request

image241

image242

bsl_spi_flash_interface

Shows an implementation of a BSL SPI Flash interface

image243

image244

bsl_uart_flash_interface

Shows an implementation of a BSL UART Flash interface

image245

image246

secondary_bsl

Implements a secondary bootloader in Main overriding the ROM BSL

image247

image248

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

cmsis_dsp_empty

Empty example using CMSIS-DSP

image249

image250

cmsis_dsp_fft_q15

FFT of fixed point array using CMSIS-DSP

image251

image252

2.8 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

adc_dma_ping_pong

Capture ADC data into 2 (ping-pong) buffers

N

image253

adc_to_i2c_target

Sample ADC and respond to I2C commands sent by a controller

image254

image255

adc_to_pwm

Convert analog voltage to PWM

image256

image257

adc_to_spi_peripheral

Sample ADC and respond to SPI commands sent by a controller

image258

image259

adc_to_uart

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

image260

image261

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.

image262

N

digital_mux

Emulate a digital mux with GPIO

N

image263

diode_matrix

Drive LEDs with fewer pins using diode matrix

N

image264

fir_low_pass_filter

Applies digital FIR low-pass filter to sampled ADC signals

image265

N

iir_low_pass_filter

Applies digital IIR filter to sampled ADC signals

image266

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.

image267

image268

programmable_gain_amplifier_1

Use programmable gain amplifier to dynamically adjust gain

N

image269

programmable_gain_amplifier_2

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

N

image270

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.

image271

N

pwm_dac

Use a timer to create a PWM DAC

N

image272

pwm_led_driver

Create a pulsating LED effect using timers

image273

image274

signal_acquisition

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

image275

N

task_scheduler

A simple run to completion task scheduler

image276

image277

temp_sense_thermistor

Sample LaunchPad thermistor using integrated Op-Amp and ADC

N

image278

transimpedance_amplifier

Configure Op-amp in transimpedance amplifier topology

N

image279

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.

image280

image281

uart_to_i2c_bridge

Translates UART packets to multiple I2C devices

image282

image283

2.9 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

dali_led_demo

Demonstrates usage of DALI protocol with an LED control demo

N

image284

2.10 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.10.1 Type-A

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

eeprom_emulation_type_a

Demonstrates Type A EEPROM emulation to store non-volatile data

Y

Y

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

2.10.2 Type-B

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

eeprom_emulation_type_b

Demonstrates Type B EEPROM emulation to store user data

Y

Y

eeprom_emulation_type_b_test

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

Y

Y

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

gc_simple_json

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

image285

image286

gc_simple_messagepack

Demonstrates basic usage of GUI Composer communication using MessagePack protocol

image287

image288

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

iqmath_rts_ops_test

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

image289

image290

2.12.2 MathACL

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

iqmath_mathacl_ops_test

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

image291

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

blink_led

Simple FreeRTOS LED blinky demo using two tasks

image292

image293

posix_demo

Simple Posix FreeRTOS blinky LED demo

image294

image295

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

lin_commander

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

image296

image297

2.14.2 Responder

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

lin_responder

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

image298

image299

2.15 Hall Sensored Trap BLDC Motor Control

The MSPM0 SDK includes examples to evaluate the sensored trap hall motor control library with the DRV8316REVM and DRV8329AEVM. 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 DRV8316

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

drv8316revm-gui-firmware

Firmware for LP_MSPM0G3507 and DRV8316R EVM GUI

image300

N

2.15.2 DRV8329

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

drv8329aevm-gui-firmware

Firmware for LP_MSPM0G3507 and DRV8329A EVM GUI

image301

N

2.16 Sensorless FOC BLDC 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 DRV8323RS

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

sensorless-foc-demo

Demo sensorless FOC code for LP_MSPM0G3507 and DRV8323RS EVM GUI

image302

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

drv8706s-q1evm-gui-firmware

Firmware for LP_MSPM0L1306 and DRV8706S-Q1 EVM GUI

N

image303

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

drv8411aevm-gui-firmware

Firmware for LP_MSPM0L1306 and DRV8411AEVM GUI

N

image304

2.18.2 DRV8889-Q1

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

drv8889-q1evm-gui-firmware

Firmware for LP_MSPM0L1306 and DRV8889-Q1 EVM GUI

N

image305

2.19 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.19.1 Controller

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

pmbus_controller_tps544b20evm

Use MSPM0 to configure TPS544B20EVM over PMBus

image306

image307

2.20 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.20.1 Controller

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

smbus_controller

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

image308

image309

2.20.2 Target

Project Name

Description

EVM

LP_MSPM0G3507

LP_MSPM0L1306

smbus_target

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

image310

image311