This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430G2210: MSP430G2210 startup

Part Number: MSP430G2210

I made several projects using MSP430 chips in the past and had never a startup problem.

Today with a new design of LED light product I struggle to get a normal startup from the CPU. When connected to my IAR development platform no problem, but once the software loaded and under power problems appear. Even the hardware reset button does only work after several minutes of power-up?

My code:

#include "io430.h"
#include "stdint.h"

unsigned long ic=0,stat=0,day_light=0,ic2=0,ic3=0, night_time=43200,t1=0,t2=0,tne=43200;
unsigned int om=0,ii=0,oms=0,imc=5400,tc=0,td=0,om2=0;

//MLX75303 light sense is low output at sensor

int main( void )
{

WDTCTL = WDTPW + WDTHOLD;

IFG1 &= ~OFIFG;
while (BCSCTL3 & LFXT1OF)
BCSCTL3 = LFXT1S_2;


P1REN=0x1B;
P1DIR |= 0x80; // Set output direction

BCSCTL3|=LFXT1S_2;

TACTL=MC_2|ID_1|TASSEL_0;
P1OUT=0x00;
t1=night_time;

TACCR0=47300; // MEASURED FOR 333 msec.
TACCTL0=CCIE;
TACTL=MC_1|ID_3|TASSEL_2|TACLR;

ii=P1IN;
om=(((ii&0x04)>>2)|((ii&0x20)>>4)); // read operation mode
// om: operating mode
// 0: always ON when voltage applied
// 1: ON when darkness is sensed
// 2: ON 4 hours after sunset and 4 hours before sunrise
// 3: always ON when voltage applied

CACTL1=CAREF0|CAREF1|CAON;
CACTL2=P2CA3|P2CA2;

ii=(CAOUT&CACTL2);

if(om==3 || om==0)
{
P1OUT=0x80;
}
else
{
__enable_interrupt();
}
for (;;)
{
__low_power_mode_0();
}

  • Hi Robert,

    Sorry I don't go through all your code as it's really not a good format.

    Could you please give me some detailed information about the "power-up" problem? You said with IAR platform it's ok, does this mean it works well when debugging but fail to work with free run? What's the phenomenon you observe? What's the DVCC you are using?

    Plus, I noticed at the very beginning there is a while statement. Do you check if the device can pass this statement soon, not hang there?

    Last thing, if you want to post code, could you please use the "insert code using Syntaxhighlighter" button to have a good format.

  • Sorry, I probably found the failure. Another chip on my PCB requires a minimum 3Volt when my supply is set to 2.97V. The chip disturbs the circuits trying to startup.

    Will make some changes to bring supply up to 3.3Volt

**Attention** This is a public forum