Other Parts Discussed in Thread: MSP-FET
Hello,
I am in the middle of development of electricity meter, based on MSP430F6723.
The chip has power supply on DVCC and additional battery on AUX1. The idea is to have the power supplied switched (HW control) when main power is off, store some data and put the device to LPM3. When power is back - put the meter to normal operation.
What I found out was that this works most of the time. Unfortunately, every now and then a strange thing happens. When main power is off, the chip will go to some strange state with high power consumption - approx 2.5 mA (expected 5 - 6 uA). In this case it will not go back to normal after power is restored, it takes 2 or 3 on-off cycles to have it running. This condition happens quite often if you apply two or three consecutive off-on cycles (which is quite normal on the grid).
At first I thought I was doing something wrong in my code, so I tried to simplify the whole project. Finally I have this:
#include <msp430.h>
void main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
AUXCTL0 = AUXKEY;
AUXIFG=0;
AUXIE|=AUX0SWIE|AUX1SWIE;
AUXCTL0 &= ~LOCKAUX;
_enable_interrupt();
while (1)
{
}
}
#pragma vector = AUX_VECTOR
__interrupt void AUX_ISR (void)
{
switch(__even_in_range(AUXIV,AUXIV_AUXMONIFG))
{
case AUXIV_NONE: break;
case AUXIV_AUXSWNMIFG: break;
case AUXIV_AUX0SWIFG:
__bic_SR_register_on_exit(LPM3_bits);
break;
case AUXIV_AUX1SWIFG:
__bis_SR_register_on_exit(LPM3_bits+GIE);
break;
case AUXIV_AUX2SWIFG: break;
case AUXIV_AUX0DRPIFG: break;
case AUXIV_AUX1DRPIFG: break;
case AUXIV_AUX2DRPIFG: break;
case AUXIV_AUXMONIFG: break;
default: break;
}
}
This is the whole code, nothing else is in the project.
In this case the power consumption is higher, since there would be some power leakage through some pins, but the whole picture is the same - normal condition in LPM3 - 250 - 300 uA, and in this 'strange' condition - about 2.8 mA.
Is there any minimum time between switching or anything else I need to secure to have reliable switching?
Thanks in advance
Maxim Karakash