MSPM33 SDK Examples Guide¶
1. Introduction¶
The MSPM33 SDK is packaged with a wide selection of code examples to enable engineers to develop applications on Texas Instruments’ MSPM33 family of microcontrollers.
The examples folder is divided into RTOS and non-RTOS subfolders. These folders contain examples for each LaunchPad and are organized based on function with lower-level Driverlib examples, security examples, boot manager examples, BSL examples, CMSIS DSP examples, and demo applications.
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
in the sections below.
2. MSPM33 SDK Examples¶
2.1 Demos¶
The MSPM33 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_MSPM33C321A | ||
cc3200boosterpack_audio_playback | Audio playback demo using CC3200 BoosterPack | Y |
lvgl | LVGL graphics library demonstration | Y |
2.2 FreeRTOS¶
The MSPM33 SDK includes FreeRTOS examples to demonstrate how to use the FreeRTOS real-time operating system with MSPM33 devices.
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
blink_led | Simple FreeRTOS LED blinky demo using two tasks | Y |
2.3 BSL (Boot Strap Loader)¶
The MSPM33 SDK includes BSL examples to demonstrate boot strap loader functionality for firmware updates.
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
bsl_host_mcu_to_mspm33c321a_target_i2c | BSL host MCU to MSPM33C321A target using I2C communication | Y |
bsl_host_mcu_to_mspm33c321a_target_uart | BSL host MCU to MSPM33C321A target using UART communication | Y |
2.4 CMSIS DSP¶
The MSPM33 SDK includes CMSIS DSP examples to demonstrate digital signal processing capabilities.
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
cmsis_dsp_empty | Empty CMSIS DSP project template | Y |
cmsis_dsp_fft_q15 | CMSIS DSP FFT Q15 format example | Y |
2.5 Security¶
The MSPM33 SDK includes security examples to demonstrate the security features of MSPM33 devices.
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
debug_unlock_L2 | Debug unlock Level 2 security example |
|
empty | Empty security project template |
|
gpio_toggle | GPIO toggle example with security features |
|
memory_hide_protect | Memory hide and protection example |
|
memory_protect | Memory protection example |
|
peripheral_protect_basic | Basic peripheral protection example |
|
peripheral_protect_dma | DMA peripheral protection example |
|
2.6 Boot Manager¶
The MSPM33 SDK includes boot manager examples to demonstrate secure booting capabilities.
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
customer_secure_code | Customer Secure Code based off MCUBoot | Y |
customer_secure_sample_image | Customer Secure Sample Image for secure boot | Y |
2.7 DriverLib¶
DriverLib is a set of low level drivers providing an API for accessing MSPM33 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.7.1 aesadv¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
aesadv_cbc_256_enc_dec | AES256 CBC encryption and decryption example |
|
aesadv_cfb_256_enc_dec | AES CFB 256 bit encryption and decryption example |
|
aesadv_ctr_128_enc_dec | AES CTR 128 bit encryption and decryption example |
|
aesadv_ecb_256_encrypt | AES ECB 256 bit encryption example |
|
aesadv_ecb_256_encrypt_interrupt | AES ECB 256 bit encryption example using interrupts |
|
aesadv_gcm_128_enc_dec | AES GCM 128 bit encryption and decryption example, with keystore |
|
aesadv_gcm_auto_128_enc_dec | AES GCM auto 128 bit encryption and decryption example |
|
aesadv_ofb_256_enc_dec | AES OFB 256 bit encryption and decryption example |
|
2.7.2 Comparator (COMP)¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
comp_analog_filter | Comparator using external inputs with hysteresis and output analog filter |
|
comp_dac_to_timer_event | Comparator output using 8-bit DAC triggers a timer event to measure timing |
|
comp_hs_dac_vref_external | Comparator in high-speed mode using 8-bit DAC with external VREF |
|
comp_hs_tima_pwm_fault | Comparator in high-speed mode triggers a TIMA fault |
|
comp_lp_dac_vref_internal | Comparator in low-power mode using 8-bit DAC with internal VREF |
|
2.7.3 CRCP¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
crcp_calculate_checksum | CRCP16 checksum calculation of a memory block |
|
crcp_calculate_checksum_32bit | CRCP32 checksum calculation of a memory block |
|
crcp_calculate_checksum_dma | CRCP16 checksum calculation of a memory block using DMA block transfer |
|
crcp_calculate_checksum_dma_32bit | CRCP32 checksum calculation of a memory block using DMA block transfer |
|
2.7.4 Crypto SHA¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
crypto_sha_224 | SHA-224 hash calculation example |
|
crypto_sha_256 | SHA-256 hash calculation example |
|
crypto_sha_256_hmac | SHA-256 HMAC calculation example |
|
2.7.5 Direct Memory Access (DMA)¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
dma_block_transfer | DMA copies from Flash main memory to SRAM memory |
|
dma_fill_data | DMA memory fill of SRAM using DMA |
|
dma_table_transfer | DMA using Table mode with DMA |
|
dma1_block_transfer | DMA1 copies from Flash main memory to SRAM memory |
|
dma1_fill_data | DMA1 memory fill of SRAM using DMA |
|
dma1_table_transfer | DMA1 using Table mode with DMA |
|
2.7.6 EAM¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
eam_fpi_security_error | EAM FPI security error example |
|
2.7.7 Non-Volatile Memory (FLASHCTL)¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
flashctl_dynamic_memory_protection | Flash configured with dynamic protection |
|
flashctl_ecc_error_injection | Flash ECC testing and SEC and DED error detection |
|
flashctl_multiple_size_read_verify | Implementation of Flash read verify commands on multiple data sizes, with and without ECC |
|
flashctl_multiple_size_write | Flash writing of different size data |
|
flashctl_program_with_ecc | Flash writing of different size data with ECC |
|
2.7.8 GPIO¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
gpio_input_capture | GPIO triggers interrupt by input capture pin |
|
gpio_simultaneous_interrupts | Demonstrates how to simultaneously service three GPIO interrupts |
|
gpio_software_poll | GPIO output is set based on polled input |
|
gpio_toggle_output | GPIO toggling an output pin |
|
gpio_toggle_output_cpp | GPIO toggling output pins using C++ |
|
gpio_toggle_output_hiz | GPIO toggling an ouputput pin configured as Hi-Z |
|
2.7.9 High-Speed ADC (HSADC)¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
hsadc_conversion_continuous | HSADC continuous conversion example |
|
hsadc_conversion_software_trigger | HSADC conversion triggered by software |
|
hsadc_dma_transfer | HSADC using DMA for data transfer |
|
hsadc_interrupt | HSADC using interrupts |
|
hsadc_ppb_data_processing | HSADC post-processing block data processing |
|
hsadc_ppb_limit | HSADC post-processing block limit detection |
|
hsadc_ppb_oversampling | HSADC post-processing block oversampling |
|
hsadc_pre_emption | HSADC pre-emption example |
|
hsadc_results_fifo | HSADC results FIFO example |
|
hsadc_single_conversion | HSADC single conversion example |
|
hsadc_single_conversion_vref_external | HSADC single conversion with external reference |
|
hsadc_single_conversion_vref_internal | HSADC single conversion with internal reference |
|
hsadc_triggered_by_timer_event | HSADC conversion triggered by a timer event |
|
2.7.10 Inter-Integrated Circuit (I2C)¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
i2c_controller_rw_multibyte_fifo_interrupts | I2C Controller reading and writing multiple bytes using interrupts with FIFO |
|
i2c_controller_rw_multibyte_fifo_poll | I2C Controller reading and writing multiple bytes polling FIFO |
|
i2c_dma_transfer_controller | I2C Controller reading and writing multiple bytes using DMA |
|
i2c_dma_transfer_target | I2C Target reading and writing multiple bytes using DMA |
|
i2c_target_rw_multibyte_fifo_interrupts | I2C Target reading and writing multiple bytes using interrupts |
|
i2c_target_rw_multibyte_fifo_interrupts_stop | I2C Target reading and writing multiple bytes using interrupts while in STOP mode |
|
i2c_target_rw_multibyte_fifo_poll | I2C Target reading and writing multiple bytes polling FIFO |
|
2.7.11 I2S¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
i2s_controller_write_multibyte_fifo_poll | I2S Controller write multibyte FIFO with polling |
|
i2s_target_read_multibyte_fifo_poll | I2S Target read multibyte FIFO with polling |
|
2.7.12 IWDT¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
iwdt_periodic_reset | Periodic reset of the independent watchdog timer |
|
2.7.13 Controller Area Network (MCAN)¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
mcan_loopback | MCAN transmits and receives messages using loopback mode |
|
mcan_message_rx | Example configured to receive CAN and CAN-FD frames |
|
mcan_multi_message_tx | CAN-FD transmits two messages with unique ID on GPIO interrupt |
|
mcan_single_message_tx | CAN-FD transmits a single message on GPIO interrupt |
|
2.7.14 Timer - Advanced (TIMA)¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
tima_timer_mode_periodic_repeat_count | TIMA timer in periodic mode with repeat count |
|
tima_timer_mode_pwm_dead_band | TIMA timer in PWM mode with dead band |
|
2.7.15 Timer - General Purpose (TIMG)¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
timg_32bit_timer_mode_periodic_sleep | TIMG 32-bit timer in periodic mode with sleep |
|
timg_32bit_timer_mode_pwm_edge_sleep | TIMG 32-bit timer in PWM edge mode with sleep |
|
2.7.16 Timer - Generic (TIMX)¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
timx_timer_mode_capture_duty_and_period | TIMX timer in capture mode measuring duty cycle and period |
|
timx_timer_mode_capture_edge_capture | TIMX timer in capture mode with edge capture |
|
timx_timer_mode_compare_edge_count | TIMX timer in compare mode with edge count |
|
timx_timer_mode_one_shot_standby | TIMX timer in one-shot mode with standby |
|
timx_timer_mode_periodic_sleep | TIMX timer in periodic mode with sleep |
|
timx_timer_mode_periodic_standby | TIMX timer in periodic mode with standby |
|
timx_timer_mode_periodic_stop | TIMX timer in periodic mode with stop |
|
timx_timer_mode_pwm_center_stop | TIMX timer in PWM center mode with stop |
|
timx_timer_mode_pwm_edge_sleep | TIMX timer in PWM edge mode with sleep |
|
timx_timer_mode_pwm_edge_sleep_shadow | TIMX timer in PWM edge mode with sleep and shadow |
|
timx_timer_mode_pwm_cross_trigger_stop_restore | TIMX timer in PWM mode with cross trigger stop and restore |
|
2.7.17 Real-Time Clock (RTC)¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
rtc_a_tamper_timestamp_event | Generates a time stamp event on RTC_A upon tamper detection |
|
rtc_calendar_alarm_standby | RTC sets calendar alarm and toggles GPIO when alarm is triggered |
|
rtc_offset_calibration_lfxt | RTC offset correction of crystal |
|
rtc_periodic_alarm_lfosc_standby | RTC implementation of periodic alarm in STANDBY using LFOSC |
|
rtc_periodic_alarm_lfxt_standby | RTC implementation of periodic alarm in STANDBY using LFXT |
|
rtc_temperature_calibration_lfxt | RTC temperature calibration of crystal |
|
2.7.18 Scratchpad¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
scratchpad_erase_on_tamper | Scratchpad erase on tamper detection |
|
scratchpad_retain_on_vdd_loss | Scratchpad retain on VDD loss |
|
2.7.19 SPI¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
spi_controller_command_data_control | SPI controller command data control |
|
spi_controller_fifo_dma_interrupts | SPI controller using FIFO with DMA and interrupts |
|
spi_controller_internal_loopback_poll | SPI controller internal loopback with polling |
|
spi_controller_multibyte_fifo_poll | SPI controller multibyte FIFO with polling |
|
spi_controller_register_format | SPI controller register format |
|
spi_controller_repeated_fifo_dma_interrupts | SPI controller repeated FIFO with DMA and interrupts |
|
spi_peripheral_command_data_control | SPI peripheral command data control |
|
spi_peripheral_fifo_dma_interrupts | SPI peripheral using FIFO with DMA and interrupts |
|
spi_peripheral_multibyte_fifo_poll | SPI peripheral multibyte FIFO with polling |
|
spi_peripheral_register_format | SPI peripheral register format |
|
spi_peripheral_repeated_fifo_dma_interrupts | SPI peripheral repeated FIFO with DMA and interrupts |
|
2.7.20 System Control (SYSCTL)¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
sysctl_cpureset | System control CPU reset example |
|
sysctl_frequency_clock_counter | System control frequency clock counter example |
|
sysctl_hfxt_run | System control HFXT run example |
|
sysctl_lfxt_standby | System control LFXT standby example |
|
sysctl_mclk_syspll | System control MCLK SYSPLL example |
|
sysctl_power_policy_sleep_to_standby | System control power policy sleep to standby example |
|
sysctl_power_policy_sleep_to_stop | System control power policy sleep to stop example |
|
sysctl_shutdown | System control shutdown example |
|
2.7.21 SysTick¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
systick_periodic_timer | SysTick periodic timer example |
|
2.7.22 TamperIO¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
tamperio_heartbeat | TamperIO heartbeat example |
|
2.7.23 True Random Number Generator (TRNG)¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
trng_sample | TRNG sample generation example |
|
trng_sample_stop_restore | TRNG sample with stop and restore example |
|
2.7.24 Universal Asynchronous Receiver Transmitter (UART)¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
uart_extend_irda_receive_packet | UART extend IrDA receive packet example |
|
uart_extend_irda_send_packet | UART extend IrDA send packet example |
|
uart_extend_manchester_echo | UART extend Manchester echo example |
|
uart_extend_manchester_send_packet | UART extend Manchester send packet example |
|
uart_internal_loopback_spgss0_uc1 | UART internal loopback SPGSS0 UC1 example |
|
uart_internal_loopback_standby_restore | UART internal loopback standby restore example |
|
uart_internal_loopback_with_interrupt_spgss0_uc1 | UART internal loopback with interrupt SPGSS0 UC1 example |
|
uart_rx_console_multibyte_repeated_fifo_dma | UART RX console multibyte repeated FIFO DMA example |
|
uart_rx_echo_interrupts_standby | UART RX echo interrupts standby example |
|
uart_rx_external_data_receive | UART RX external data receive example |
|
uart_rx_hw_flow_control | UART RX hardware flow control example |
|
uart_rx_multibyte_fifo_dma_interrupts | UART RX multibyte FIFO DMA interrupts example |
|
uart_rx_rw_multibyte_fifo_poll | UART RX read/write multibyte FIFO poll example |
|
uart_tx_console_multibyte_repeated_fifo_dma | UART TX console multibyte repeated FIFO DMA example |
|
uart_tx_echo_interrupts_standby | UART TX echo interrupts standby example |
|
uart_tx_external_data_send | UART TX external data send example |
|
uart_tx_hw_flow_control | UART TX hardware flow control example |
|
uart_tx_multibyte_fifo_dma_interrupts | UART TX multibyte FIFO DMA interrupts example |
|
uart_tx_rw_multibyte_fifo_poll | UART TX read/write multibyte FIFO poll example |
|
2.7.26 Other¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
empty | Empty start-up project using DriverLib |
|
2.7.25 WWDT¶
Project Name | Description | EVM |
|---|---|---|
LP_MSPM33C321A | ||
wwdt_interval_timer_lfosc_standby | WWDT interval timer using LFOSC in STANDBY mode |
|
wwdt_interval_timer_lfxt_standby | WWDT interval timer using LFXT in STANDBY mode |
|
wwdt_window_mode_periodic_reset | WWDT window mode with periodic reset |
|