Low Power Modes

Mecrisp-Across has low power Words ready for use, see the table below.

Low Power Test Program

Note

The current in microamperes was measured using a MSP430G2452 at 3v using the code listed below. The current was measured with a microammeter connected between TM4C1294 Host Pin 3.3V and MSP430 Target pin VCC. The current into Vcc after the leds had finished flashing.

Enter the following code into the terminal, copy and paste each line into Picocom, or simply upload lp-blinky.fs via Picocom with :

Action

Command

Comments

FILE UPLOAD

<CTL> A S

lp-blinky.fs (this command has TAB file completion).

new
+jtag
target

: off ( -- ) 0 p1out c! ;
: red ( -- ) 1 p1out c@ or p1out c! ;
: green ( -- ) $40 p1out c@ or p1out c! ;
: delay ( -- ) 65535 0 do loop ;
: delay1 ( delay -- ) 0 do delay loop ;
: blink ( -- )
   eint                           \ enable interrupts
   8mhz                           \ use the 8Mhz clock
   $41 p1dir c!                   \ initialise Port 1, bits 1 and 6 as outputs
   5 0 do                 \ loop 5 times
      red 3 delay1        \ red led on, then delay for 3*65535 cycles
      off 3 delay1        \ turn all leds off the delay
      green 3 delay1
      off 3 delay1
   loop
   300 delay1             \ measure the quiescent current
   red green 3 delay off
   lpm4
 ;                        \ activate low power mode 4, the most frugal mode of all
                          \ measure the LPM4 current after red and green leds pulse once together

host

\ $FFFE vector blink crosscompile flashtarget -jtag run   <-- run this command without the "\" after the terminal is back at the Host
\ 254 bytes

Low Power Current Measurements Table

This table is reasonably accurate, but at low currents may affected by the connected JTAG umbilical which I didn’t disconnect for these measurements and will power the MCU when Vcc is removed. It will also be affected by Vcc value (lower Vcc = less current), clock speed, peripherals in use, configurations, floating GPIO pins etc.

Nevertheless 0.21 microamperes is a very impressive figure for a simple test like this so the MSP430 may just be the King of Low Power 16 bit MCUs!

Word

Description

Microamperes Quiescent

Microampere Reduction %

none

Quiescent: “Active Mode” All clocks are active, leds off

2500

0

LPM0

CPU is disabled, ACLK and SMCLK remain active, MCLK is disabled

302

87.92

LPM1

CPU is disabled, ACLK and SMCLK remain active, MCLK is disabled, DCO’s dc generator is disabled if DCO not used in active mode

302

87.92

LPM2

CPU is disabled, MCLK and SMCLK are disabled, DCO’s dc generator remains enabled, ACLK remains active

26.41

98.9436

LPM3

CPU is disabled, MCLK and SMCLK are disabled, DCO’s dc generator is disabled, ACLK remains active

1.03

99.9588

LPM4

CPU is disabled, ACLK is disabled, MCLK and SMCLK are disabled, DCO’s dc generator is disabled, Crystal oscillator is stopped

0.21

99.9916