Hi guys!
I am building a LED wristwatch based on the MSP430G2452. A 32.768kHz crystal is attached and used as ACLK.
MCLK and SMCLK are from the DCO @ 8MHz.
Every 250ms, the WDT (clocked with ACLK) interrupts the MCU to count time (1/4th of a second) and to check the if the user pushed the only touch button (measurement method is RO_PINOSC_TA0 from the CTS library).
It works fine, but the average supply current is around 35µA and I am not able to find this number.
I set the P1.0 pin when I leave LPM3 and I clear it when I enter LPM3. The same goes for P1.6 and LPM0.
The MCU spend 70µs in Active Mode (AM) and what is left of the 250ms in LPM3.
So it is consuming 2.5mA for 70µs (AM @ 8MHz, Vcc = 3.3V) and 1.0µA for 250ms (LPM3 with LFXT1). This leads to 1.7µA average supply current.
This is very different from the measured 35µA.
I'm not using ADC10 or Comp A+. Just TimerA for touch sensing.
I am starting to consider that the MCU is not entering correctly LPM3 as LPM2 or LPM0 current consumption is gives 27µA or 56µA average.
What am I not taking into account ?
main.c : http://pastebin.com/Hz4Aeb3K
RTC.c : http://pastebin.com/3cY2nh6j
RTC.h : http://pastebin.com/jrf7WK9r
state.c : http://pastebin.com/xTwjSKHQ
state.h : http://pastebin.com/6iQG3i4N
CTS_HAL.c (partial) : http://pastebin.com/VcuTk3RA
Thanks