Readme

Example Summary

COMP is configured using the 8-bit DAC as positive input, and the external pin as negative input. The DAC is set to 1V using VDDA as reference. The output of the comparator triggers a timer event. The timer is configured in Edge Time Capture mode with a capture window of 2s. At the end of the window, a breakpoint is triggered to check the number of detected captures.

Peripherals & Pin Assignments

Peripheral Pin Function
SYSCTL
TIMG0
VREF
COMP0 PA27 COMP Negative Channel 0 Pin
EVENT
DEBUGSS PA20 Debug Clock
DEBUGSS PA19 Debug Data In Out

BoosterPacks, Board Resources & Jumper Settings

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

Pin Peripheral Function LaunchPad Pin LaunchPad Settings
PA27 COMP0 IN0- J4_37
  • PA27 can be connected to LED2 Blue
    • J13 OFF Disconnect from LED2 Blue
PA20 DEBUGSS SWCLK J2_13
  • PA20 is used by SWD during debugging
    • J101 15:16 ON Connect to XDS-110 SWCLK while debugging
    • J101 15:16 OFF Disconnect from XDS-110 SWCLK if using pin in application
PA19 DEBUGSS SWDIO J2_17
  • PA19 is used by SWD during debugging
    • J101 13:14 ON Connect to XDS-110 SWDIO while debugging
    • J101 13:14 OFF Disconnect from XDS-110 SWDIO if using pin in application

Device Migration Recommendations

This project was developed for a superset device included in the LP_MSPM0L1306 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-MSPM0L1306 User’s Guide.

Example Usage

Connect COMP_IN- to an external signal that varies above and below the voltage specified by COMP_INST_DAC8_OUTPUT_VOLTAGE_mV.

Compile, load and run the example. A breakpoint will be triggered after 2sec. Check gCaptureCounter to see the number of rising or falling edges seen on COMP_IN-.