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.

MSP430F5659: Code hangs sometime on start up,

Part Number: MSP430F5659

Hi,

I am working on MSP430F5659 based controller with my custom board, using internal SMCLK 8MHz for CPU execution

I have membrane switch to turn ON-OFF. board.

Some time when i press the membrane switch system is not properly turning on ( No code runs) even micro-controller has the power i.e 3.3V,that is checked.

I don't know whether  the Code Corruption is happening or reset vector corrupted , by the way wrong code execution during power is happening. 

Any system power handling issue is causing this? since power is already available, or more current consumption by some external circuit causing this? 

Since we have 24v generation logic, USB hub also present on our custom board. 

How to make sure its due to reset vector corruption, any h/w issue, system voltage not properly handled ?

If i press again i.e. after 2-3 times system starts properly without any issue.

Please some one can help is resolving this issue, Thanks in advance

Nitesh

  • Two most popular problems in such case: 1) low level init at startup takes longer than WDT period and system never goes out of WDT reset loop or 2) VCC/freq violation - you increase system clock too early while VCC is not at nominal level which leads to MCU crash.

    To solve potential problem 1) you shall add following to your code:
    int __low_level_init(void) {
    WDTCTL = WDTPW + WDTHOLD; // Stop WDT (Watch Dog Timer)
    return 1;
    }
    To solve problem 2) right after entering main() and disabling WDT, you shall add some delay before setting high frequency clock, like __delay_cycles(100000)
  • thanks for the input,

    Just forgot to mention i am using TI RTOS in my application, and separate WDT task to handle the External WDT and i am disabling the internal WDT before running the scheduler.I will check one more time whether i am disabling internal WDT.
    Even i will try to add delay before setting CLK. Maximum frequency i can achieve is 8 MHz for MSP430F5659 controller.
    As per the example code i have set the CLK.

    IS there any PMM mode change is required ?

    Please suggest me, thanks in advance
    Nitesh

**Attention** This is a public forum