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 14 bit ADC oversample 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: 24 Sep 2025 3:43 PM Date Created
  • Views 111 views
  • Likes 5 likes
  • Comments 4 comments
  • MSPM0L1105
  • MSPM0
  • easyL1105
Related
Recommended

14 bit ADC oversample example for the EasyL1105 MSPM0 board

Jan Cumps
Jan Cumps
24 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, adc14_14bit_resolution, uses hardware to oversample the 12 bit onboard ADC. And DMA to retrieve 1024 samples. It goes in low power mode while sampling is happening. It's originally written for the LP-MSPM0L1117 LaunchPad. I'm porting it (just like I did in Port an SDK example to the EasyL1105 MSPM0 board).

What does it do?

The design uses the 12 bit ADC peripheral options to oversample to 14 bits:

image

From the readme:

ADC12 Hardware averaging is configured to accumulate 16 samples and divide by 4 to achieve 14-bit effective resolution.

Use DMA to get 1024 samples - in low power mode. The selected input is ADC channel 2. On the EasyL1105, this is J2.9.

image

image

While ADC and DMA are doing their work in the background, we allow the controller to poll for completeness in a power saving mode:

        DL_ADC12_startConversion(ADC12_0_INST);

        while (false == gCheckADC) {
            __WFE();
        }

The WFE arm assembler instruction 

A usage for WFE is to put it into a spinlock loop. ... To save power, you can insert the WFE instruction into the loop so the CPUs instead of looping continuously will enter STANDBYWFE.

image

The gCheckADC flag gets set in the ADC interrupt handler, when DMA has finished loading 1024 samples:

void ADC12_0_INST_IRQHandler(void)
{
    switch (DL_ADC12_getPendingInterrupt(ADC12_0_INST)) {
        case DL_ADC12_IIDX_DMA_DONE:
            gCheckADC = true;
            break;
        default:
            break;
    }
}

image

The ccs project with source and config files is attached. Thank you for reading.

ccs project adapted to EasyL1105: 3704.adc12_14bit_resolution_EasyL1105_20250923.zip

Related posts

  • Sign in to reply
Parents
  • shabaz
    shabaz 20 hours ago

    Nice! Ive got a project idea Jan Cumps might be of interest..

    It's just a half-thought idea so far. I would like to control a heater element with PID, using the ADC to sense a thermistor. The heater and sensor are are spare parts for 3D printers, the photo shows the one I got, but there are others which come with the heater and sensor assembled in a block with nozzle. I don't want it for 3D printing, but for hot-stamping (a friend asked about this, I figured I would give it a shot). So, I drilled a 6mm hole and a 3mm hole in aluminium. That's as far as I have got.

    image

    The photo below shows the bits and pieces so far.. the brass plates are to somehow hold the shape to punch, I'm still thinking that through and might have a solution for that part. Anyway, maybe heater control is an interesting thing for all manner of projects. Maybe the set temperature could be another ADC channel, connected to a potentiometer. Or just up/down buttons and a little display. Not thought of all that so far. Maybe it could be worth making a custom PCB for it too, with a MOSFET. Anyway just throwing the idea out there in case anyone has a small heater requirement and wants to help or even just brainstorm, all ideas welcome to make it a little general purpose and not overly excessive circuit effort : )

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps 16 hours ago in reply to shabaz

    A port of nuvoton PID Control Operation in Fixed-point Format. It's a PID algorithm for ARM M0:

    pid_EasyL1105_20250924.zip

    Calls the PID algo 5 times per second. Timer code based on timx_timer_mode_periodic_sleep.  

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz 16 hours ago in reply to Jan Cumps

    That's awesome! Just assembling up the bits now and will give it a shot..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz 14 hours ago in reply to Jan Cumps

    The mechanics are now fairly complete.

    image

    The heater is clamped between the two halves and the thermistor is friction fit. I used fragments of thermal grease replacement paper (Bergquist QPAD) to get a tight fit. 

    The screws are a bit long, I need to trim those. Anyway, you can see how the metal punches are clamped in place.

    I need to make some sort of attaching plate, since it will obviously be too hot to handle. But aside from that, I can now work on soldering up a MOSFET to the MSPM0. 

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • shabaz
    shabaz 14 hours ago in reply to Jan Cumps

    The mechanics are now fairly complete.

    image

    The heater is clamped between the two halves and the thermistor is friction fit. I used fragments of thermal grease replacement paper (Bergquist QPAD) to get a tight fit. 

    The screws are a bit long, I need to trim those. Anyway, you can see how the metal punches are clamped in place.

    I need to make some sort of attaching plate, since it will obviously be too hot to handle. But aside from that, I can now work on soldering up a MOSFET to the MSPM0. 

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
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