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.

Random Reset?

Other Parts Discussed in Thread: MSP430G2553

Hi all,

I've got a small program running on an MSP430G2553 device which keeps resetting the micro without reason. Single-stepping through the code, it keeps returning on the start of void main(), but at different points within the code - i.e. no single source of error. The watchdog has been suspended with "WDTCTL = WDTPW + WDTHOLD;" and all initial device setup is done through GRACE.

Is there any way to determine the cause of reset?  i.e. any breakpoints which can be set immediately before a restart so a backtrace can be done or rollover of registers?

Mat

  • Hi Matt,

    are you using interrupts? If yes, have you checked that the correct interrupt vector has been assigned? 

  • Leo,

    This reminded me a similar problem of another user a few weeks back. Among other things, GRACE enabled interrupts but did not set up interrupt vectors or ISR to handle them.

    http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/208768.aspx

    Posted by lhend on Mon, Aug 27 2012 8:20 AM
    @OCY: actually Jonathan has assigned the interrupt routines. He is using GRACE (http://www.ti.com/tool/grace), and if you search for a file called CSL_init.c in the zip file, you can find the interrupt vectors assigned.

    Based on the posted source code, you were incorrect in that case.

    Posted by Jonathan Hunter1 on Fri, Aug 24 2012 4:09 PM
    forgot the link...
    5226.msp430g2xx3_usci_spi_master.zip

    If you compile and link the above source code, you will see that the needed interrupt vectors are missing in the object code.

    -- OCY

  • Yes to both answers :)

    An incorrect interrupt vector was causing this problem - thanks!

    However, whilst investigating this, I created a new grace project and did basic setup to match my current code. The new empty grace project complained like mad about unused interrupt vectors. This is a new one on me, I suspect the CCS/tools upgrade brought this in after an upgrade last week (my problem code was built upon earler versions).

    Thanks

    Mat.

  • Yes, the new ULP advisor, which is enabled per default on new projects, is complaining about every possible interrupt vector that didn't get an ISR assgned. Pretty much overkill in most situations. Of course complaining about everything will also include complaining about the right thing amongs the bogus ones. Liek a virus scan that denies access to every file and therefore also all possibly infected files. Operation successful, patient dead.

**Attention** This is a public forum