7
\$\begingroup\$

I'm in a process of writing software for eZ 430 Chronos watch using TinyOS. I want it to be as low-power as it is possible.

Unfortunately, my measurements show power consumption of about 350uA @3.3V on a simple idle program which does nothing, but turn all sensors off, enable external oscillator and go into the LPM4 mode. This value is bigger than the two external sensors can eat.

The original Texas Instruments software (which I've read and found nothing I could forgot to set) consumes about 9uA when idle.

Are there any methods for debugging energy leaks? How should I proceed when checking my code (and TinyOS) didn't reveal any problem?

I measure power consumption using an oscilloscope and an amplifier similar to Dave Jones' uCurrent. I've tested this set on a set of resistors and got correct readings.

The schematics for eZ430 watch are here, on the page 79.

\$\endgroup\$
4
  • \$\begingroup\$ What IDE/compiler do you use? \$\endgroup\$
    – m.Alin
    Commented Dec 8, 2012 at 16:56
  • \$\begingroup\$ nesc-1.3.3 and Vim \$\endgroup\$ Commented Dec 8, 2012 at 17:01
  • 5
    \$\begingroup\$ TI has a checklist of rules that you can check against your source code to make sure your MSP430 has the lowest energy consumption possible. \$\endgroup\$
    – m.Alin
    Commented Dec 8, 2012 at 17:11
  • \$\begingroup\$ @m.Alin I upvoted this checklist, because I knew only part of this recommendations and they are useful. However most of them apply to the program execution and I have an energy leak even when the CPU sleeps. \$\endgroup\$ Commented Dec 9, 2012 at 20:04

3 Answers 3

5
\$\begingroup\$

The problem was with our clocks support in TinyOS, which leaved TA1CTL with continous mode bit set and prevented to enter sleep mode lower than LPM1.

From this problem I can learn some lessons for the future:

  • Proper measurement is crucial in debugging such problems. Oscilloscope with a micro current meter was very helpful.
  • Read your datasheets carefully. Knowing what is the power consumption of every device in every mode allows you to match the measured value to the device.
  • Calculate, in which sleep mode you really are. You probably have a sleep mode calculation code somewhere in your program. Print its result somewhere if you can.
  • The rest is the process of elimination. Either negative - comment or disable parts of code and check if the power consumption changes, or positive - get a piece of example software from the chip vendor and add its code by chunks to your program to check if you didn't forgot to initialize something.
\$\endgroup\$
0
\$\begingroup\$

The simple answer is: process of elimination.

Last I worked with TinyOS (almost 4 years ago), we were always having problems with its low power mode. It periodically would wake the MCU to do its scheduling.

I would recommend that you install the TI software and measure it yourself on your test rig. That will give you a better reference point.

Having looked at the schematic you referenced, 9uA seems a bit low given all the potential leakage pathways through the off-chip peripherals. It may represent a best-case or what I call an "asterisk" number (occurs only under highly qualified, carefully spec'd conditions). I didn't research the components. That's just my speculation.

\$\endgroup\$
2
  • \$\begingroup\$ I've confirmed 9uA (declared by the TI) with my own measurements. The sensors are designed as low-power and they have really low consumption when turned off. This is, of course, a value when everything on the board is turned off and the processor is in LPM4 mode. \$\endgroup\$ Commented Dec 9, 2012 at 20:00
  • \$\begingroup\$ Then the problem is in TinyOS. What version are you using? Do you have drivers for the Chronos? ...or write them yourself? I found this on the TinyOS list (which I'm on) where users were discussing the Chronos when it came out and, obviously, it wasn't supported at the time. The leakage is clearly happening in your peripherals (e.g. they're still on) or with the TinyOS scheduler (BMAC implementation wakes the CPU periodically) -- or likely a combination of both. \$\endgroup\$ Commented Dec 9, 2012 at 23:34
0
\$\begingroup\$

I can't place the exact data sheet but Linear Tech have some excellent ones on ultra low-power / low-noise measurement, look for stuff written by Jim Williams or Bob Pease, both masters of their craft.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.