Readme
Example Summary
The following example configures ADC0 to be triggered by a TimerG instance 1s after the timer has been started while the device remains Stop mode. LED1 is set if ADC conversion is greater than 1.5V using window comparator feature.
This example also showcases how to configure ADC0 in repeat single mode triggered by a timer event.
Peripherals, Pin Functions, MCU Pins, Launchpad Pins
| Peripheral | Function | MCU Pin | Launchpad Pin | Launchpad Settings |
|---|---|---|---|---|
| GPIOA | Open-Drain Output | PA0 | Red LED1 | Populate Jumper(s): J4[1:2] |
| SYSCTL | ||||
| TIMG1 | ||||
| ADC0 | ADC12 Channel 2 Pin | PA25 | J1_7 | |
| EVENT | ||||
| BOARD | Debug Clock | PA20 | J14_4 | |
| BOARD | Debug Data In Out | PA19 | J14_2 |
Device Migration Recommendations
This project was developed for a superset device included in the 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 Board→Configure Unused Pins.
For more information about jumper configuration to achieve low-power using the MSPM0 LaunchPad, please visit the LP-MSPM0C1106 User’s Guide.
Example Usage
Compile, load and run the example. Provide a valid voltage to A0_2 pin and monitor LED1 (Voltage source for ADC is expected to be between 0v and MCU supply voltage).
On powerup, the ADC pin(s) used in this example are by default set to the correct analog mode. Therefore, calls to DL_GPIO_initPeripheralAnalogFunction for pinmuxing those pins are not needed.