Readme

Example Summary

Bit-banged software UART (half-duplex) for MSPM0G3507 with auto-baud detection, echo, and ISR latency compensation.

Peripherals & Pin Assignments

Peripheral Pin Function
GPIOA PA17 SW_TX — UART TX output
GPIOA PA18 SW_RX — UART RX input (shared with TIMG7 CCP1 for baud detection)
GPIOB PB1 MARK_TIMER_ISR — measurement output for Timer ISR timing
GPIOB PB12 MARK_GPIO_ISR — measurement output for GPIO ISR timing
GPIOB PB21 Button input (falling edge) — sends test byte 0x55
GPIOB PB22 USER_LED_1 — LED indicator
TIMG6 TIMER_0 — TX/RX bit timing
TIMG7 CAPTURE_0 — baud detection capture
SYSCTL
DEBUGSS PA20 Debug Clock (SWCLK)
DEBUGSS PA19 Debug Data In Out (SWDIO)

BoosterPacks, Board Resources & Jumper Settings

Visit LP_MSPM0G3507 for LaunchPad information, including user guide and hardware files.

Pin Peripheral Function LaunchPad Pin LaunchPad Settings
PA17 GPIOA SW_TX J4_28 BoosterPack pin 28
PA18 GPIOA SW_RX / CAPTURE J4_26 BoosterPack pin 26
PB1 GPIOB MARK_TIMER_ISR J2_39 BoosterPack pin 39
PB12 GPIOB MARK_GPIO_ISR J3_19 BoosterPack pin 19
PB21 GPIOB Button J2_4 BoosterPack pin J19.4
PB22 GPIOB USER_LED_1 J2_5
  • PB22 can be connected to LED2 Blue
    • J5 ON Connect to LED2 Blue
    • J15 OFF Disconnect from LED2 Blue
PA20 DEBUGSS SWCLK N/A
  • PA20 is used by SWD during debugging
    • J101 15:16 ON Connect to XDS-110 SWCLK
    • J101 15:16 OFF Disconnect from XDS-110 SWCLK
PA19 DEBUGSS SWDIO N/A
  • PA19 is used by SWD during debugging
    • J101 13:14 ON Connect to XDS-110 SWDIO
    • J101 13:14 OFF Disconnect from XDS-110 SWDIO

Device Migration Recommendations

This project was developed for a superset device included in the LP_MSPM0G3507 LaunchPad. Please visit the CCS User’s Guide for information about migrating to other MSPM0 devices.

Low-Power Recommendations

TI recommends to terminate unused pins by setting the corresponding functions to GPIO and configure the pins to output low or input with internal pullup/pulldown resistor.

SysConfig allows developers to easily configure unused pins by selecting BoardConfigure Unused Pins.

For more information about jumper configuration to achieve low-power using the MSPM0 LaunchPad, please visit the LP-MSPM0G3507 User’s Guide.

Example Usage

Compile, load and run the example. Connect a USB-UART adapter to PA17 (TX) and PA18 (RX) at the detected baud rate.

The device performs auto-baud detection on the first received byte, then echoes all received data. Press the button (PB21) to send a test byte (0x55).

Clock selection: set CLOCK_SEL in sw_uart_g3507.c to 0 for 32MHz SYSOSC or 1 for 80MHz SYSPLL.

Compensation calibration: see header comment in sw_uart_g3507.c. Measurement pins PB1 and PB12 can be used with a logic analyzer for ISR timing calibration.