element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Blog ADC and Low Power SDK example for the EasyL1105 MSPM0 board
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 18 Sep 2025 8:24 PM Date Created
  • Views 446 views
  • Likes 7 likes
  • Comments 3 comments
  • MSPM0L1105
  • ccs
  • easyL1105
  • texas instruments
  • code_composer_studio
Related
Recommended

ADC and Low Power SDK example for the EasyL1105 MSPM0 board

Jan Cumps
Jan Cumps
18 Sep 2025

TI's SDK for the MSPM0 family has a set of examples. They are all targeting one of their LaunchPad dev kits. In this post, I'm porting another one to the EasyL1105.

The example, adc12_triggered_by_timer_event_stop, combines an ADC design with low power. It's originally written for the LP-MSPM0C1106 LaunchPad. I'm porting it (just like I did in Port an SDK example to the EasyL1105 MSPM0 board ).

What does this project do?

It lingers in lowest power mode. Then gets woken up by a timer, to retrieve ADC samples and drive a GPIO based on the measurement.

  1. It goes to lowest power mode for a second
  2. a timer expires, and wakes the controller up
  3. then a loop of
  4. taking an ADC sample while in sleep mode
  5. make decisions based on outcome and drive a GPIO, in active mode
  6. if ADC input is below VREF (1.5V) , switch on LED
  7. if above VREF, switch off LED
  8. back to 4

In the EnergyTrace capture below, you see 3 clear steps, showing 3 phases in the execution:

  1. stop mode, waiting for wake-up by the timer
  2. toggling between Sleep and Active, but comparator decides that LED has to be OFF
  3. same, but our ADC input dropped below VREF. The LED switches on and consumes significant current.

image

Port from TI's SDK example

There's one change we have to do. Our LED is on P27. And it's a standard output (not open drain).

I've done a few other changes, to take care that the I2C (not used) pull-ups don't draw current.

Peripheral Function MCU Pin Board Pin Comment
GPIOA Output PA27/2 Green LED
I2C Open-Drain Output PA0/4 SDA not used open drain driven low for power saving (no current through pull-up)
I2C Open-Drain Output PA1/5 SCL not used open drain driven low for power saving (no current through pull-up)
TIMG1
ADC0 ADC12 Channel 2 Pin PA25/28 J2/9 signals below VREF will switch on green LED
EVENT
BOARD Debug Clock PA20 J14_4
BOARD Debug Data In Out PA19 J14_2

Last change I did, is flag that we have a resistor on board that stabilises the low frequency oscillator. This doesn't result in a measurable power save or loss. But we have it, so let's flag that:

image

Test

After flashing the board (with bootloader or debugger), you can test the firmware.

ADC input is ADC12 Channel 2 on PA25. On the EasyL1105, this is J2.9. It 'll check for voltages between 0 and 1.5V, and voltages between 1.5 and 3.3V.

After a second of being in the lowest power mode (STOP), the controller wakes up, and starts sampling.
While sampling, it tries to stay in a lower power mode (SLEEP)

Then the controller goes to ACTIVE mode to make decisions and drive the LED. Then drop back to SLEEP.
It does that continuously.

You can see the behaviour by switching the ADC input between 0V and 3.3V (or if you want, use a potentiometer).

While sleeping and when voltage is high, the green LED is off. When above 1.5V the LED is on.

Use a low burden voltage current meter (or better tools*1) to assess power usage.

EnergyTrace++

If you have an EnergyTrace compatible debugger, you can use it to analyse the power consumption in css:

image

1 an EEVBlog µCurrent with a multimeter or an oscilloscope,  or a bench meter (E.g.: Keythley DMM6500) will do the job.

When you're finished

Low power designs can put your controller in a state, that makes it hard to reprogram it later. 
After I'm done testing a low power design, I prefer to re-program it with non-low-power firmware (E.g.: a blinky).

For this design, after you are done,

  • Open a non-low power design in CCS
  • connect it to a debugger
  • keep BOOT button pressed.
  • Start a debug session. Only release BOOT when your debugger is at main()

This will save you headaches later.

Have fun!

ccs project adapted to EasyL1105: adc12_triggered_by_timer_event_stop_20250918.zip

Related posts

  • Sign in to reply
  • DAB
    DAB 2 days ago

    Nice post Jan.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps 2 days ago in reply to shabaz

    It took me sometime to understand the mechanism. You set the desired default power mode in SysConfig. During build those settings end up in ti_msp_dl_config.c. At runtime, that power mode gets activated in the while loop:

    while (1) {
    __WFI();
    }
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz 3 days ago

    Very useful blog! I was peeking in the ti_msp_dl_config.c to see how the MSPM0 chip was in stop mode. 

    Also, just realized that there are examples for that chip that include UART or I2C based programming via bootloader  from one device to the next.. if I had known earlier, I could have studied that to help with the Python bootloader programmer code that I wrote! Oh well : (

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube