Jump to content

Current too high in LPM3; what am I missing?

Recommended Posts

I made a little tea timer (3 minute countdown) from the MSP430FR4133 launchpad as an exercise in learning to code microcontrollers in C. I wrote the program (main.c, attached) to spend most of its time in LPM3 and expected currents of around 3uA, but EnergyTrace reports ~20uA in free run mode. I have it powered directly from an MSP-FET (not using on board EZ-FET, jumpers are open) which is connected via Spy-Bi-Wire (3.3V, GND, TDIO, and TCK only).

I have configured all unused port pins as outputs at level 0 and am only intentionally using the RTC and LCD in LPM3, both receiving their clock from XT1. I also have Timer0 configured to 40ms rollover in up mode for button debouncing, but it is stopped all of the time except for the first 40ms after a button press. Timer0 receives its clock from ACLK, which is sourced by XT1.

I have attached fairly comprehensive screenshots of the Registers window from when the debugger was paused at the __low_power_mode_3() call. The relevant launchpad board schematics are on pages 26 and 27 of this PDF: http://www.ti.com/lit/ug/slau595b/slau595b.pdf

Any tips as to what I might be missing are appreciated. General tips for attaining datasheet current values in low power mode are also welcome.














Edited by egadpock
forgot to mention when screenshots were taken
Link to post
Share on other sites

When I have utilized EnergyTrace in the past I have found that I had to disconnect all FET data lines in order to get a measurement that was close to the calculated current consumption.  You could try disconnecting the TDIO and TCK lines, leaving just 3.3V and ground connected between your target and the FET to see if that improves the measurement.

Link to post
Share on other sites

I really haven't worked with the FR series, only the older F2013, F2274 and F5529. My experience with testing for power draw has led me to always completely disconnect the FET devices, use an external power source to measure across the power input jumper, always do a cold boot and not a warm reset.  Further, double check your mcu clocking modes - the '430 will detect certain clock states and to keep a necessary clock running, will not actually drop into LPM3.

Aside from that, my debugging temptation would be to comment out all of the LCD code and limit yourself first to the basic timer and RTC to see what's happening there. Also, is there a backlight on the LCD? (too consumed with our local fire disaster to read all the specs - I live in Napa county, CA).

In essence, my suggestion is to limit your variables to the simplest possble scheme that runs a timer, and add things in just one at a time. HTH


Link to post
Share on other sites

Thanks, Bob, for the methodology suggestion. I put only the pin and clock configuration code in and found that the current was below measurement threshold in LPM4 but still around 18uA in LPM3. I was not handling the oscillator fault flags for DCO and XT1 at startup. After properly handling these flags (and OFIFG), the tea timer is running at about 1.8uA in LPM3 with the LCD on and counting down.

It's amazing how little power this chip uses. I plan to play around with LPM3.5 and see what I can get with that.

Link to post
Share on other sites
On 10/14/2017 at 4:58 PM, dubnet said:

@NurseBob  Was saddened to see the destruction and loss of life due to the wildfires.  Hopefully you won't be affected but please evacuate without a moments hesitation if it even starts to move toward you. In the big picture stuff is truly meaningless and life is precious. 


My wife and I, along with our 4 cats, are doing OK. A bit of survivor's guilt in that the fires north and south managed to bypass, and the one west, which was burning back towards us had to go down slope and upwind, ultimately giving in to the firefighter's efforts.  I have to say, it's amazing to watch 8 or 9 aircraft all negotiating the same airspace to drop fire retardant. One of the jets was just massive.

Ultimately, we self-evacuated to Moss Beach for a couple of days where my younger daughter has a home (she and husband were in Hawaii for an anniversary celebration) after two days with no power and no phone. Home now, cats recovering from the trauma of being stuffed into carriers for hours and then ushered into a strange room owned by a different pair of cats.  Everyone is happy to be home, and the cats seem to finally have forgiven us for the imposition.

Thank you for the kind words and wise advise.


Link to post
Share on other sites

@NurseBob   Not familiar with that one, but they do have an infinite bag of tricks. :)

A memorable experience was when I was young.... I stayed over at friend's house in Southern California and slept on a pull out couch sofa bed. They had a cat with a bell on it's collar.  The room was fairly dark but I could hear the cat moving about the room, and then silence.  The cat would then launch from his perch on the back of the couch and land on my head or body.  I would shoo him off and the process would repeat, until I determined he was having far more fun than I was and wouldn't quit this game any time soon,  At that point I prevailed upon my friend to put the cat on lockdown for the night.

Link to post
Share on other sites


The "midnight weave" is the nudging head bumps in and about the ankles while walking. In the dark it can be disconcerting, to say the least...

As to memories: When I was about 12, more than five decades back, I lived on a rural patch of land in what is now a wealthy community in the SF East Bay.  One sight I still remember is one of our cats perched on the top of a fence, and as our collie mix wandered by, the cat decided that he could use the dog as a landing zone, being about half the distance to the ground.  When he landed, the dog bolted and the cat deployed and planted his claws to hang on.  So, much like a rodeo cowboy, he's hanging on for dear life as the dog is galloping down the driveway...  A sight to remember. :)


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...