The purpose of this group is to foster exchange of information on the Texas Instruments MSP430 family of microcontrollers and related tools. Everyone welcome, all levels of familiarity/expertise.
MSP430F427A program resets itself - chuckkuecker - Sep 18 3:13:36 2009
Hello,
I am working with code originally written and running on an MSP430F413 processor.
The code starts by initializing the clock and WDT as an interval timer, then enables
interrupts. It runs OK on my prototype until the first WDT interrupt. At the end of the
interrupt handler, when it executes the reti command, the program jumps to what I thought
was the reset vector, but on closer examination turns out to be 0xffff. At this point the
program restarts.
My code is nowhere near filling either flash or RAM.
I am using the IAR Embedded Workbench and the TI USB debugger.
Anyone have an idea what's going on here? I've written many programs for various MSP430
parts - this is the first time I've seen such behavior.
Chuck Kuecker
------------------------------------
______________________________
controlSUITE software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: MSP430F427A program resets itself - old_cow_yellow - Sep 18 3:20:32 2009
Before the WDT ISR reaches the reti instruction, what is the contents of SP? At that
address, is the contents 0xFFFF?
--- In m...@yahoogroups.com, "chuckkuecker"
wrote:
>
> Hello,
>
> I am working with code originally written and running on an MSP430F413 processor.
>
> The code starts by initializing the clock and WDT as an interval timer, then enables
interrupts. It runs OK on my prototype until the first WDT interrupt. At the end of the
interrupt handler, when it executes the reti command, the program jumps to what I thought
was the reset vector, but on closer examination turns out to be 0xffff. At this point the
program restarts.
>
> My code is nowhere near filling either flash or RAM.
>
> I am using the IAR Embedded Workbench and the TI USB debugger.
>
> Anyone have an idea what's going on here? I've written many programs for various MSP430
parts - this is the first time I've seen such behavior.
>
> Chuck Kuecker
>
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: MSP430F427A program resets itself - ckue...@primexinc.com - Sep 18 9:57:55 2009
The stack pointer is at 0x05fa, and is pointing to 0x0009, which is not in usable memory.
I think somehow the stack is getting corrupted.
On entry to the WDT ISR the stack @ 0x5fa is 0x0009, so it's not the ISR causing the bad
return address.
Hello,
>
>I am working with code originally written and running on an MSP430F413 processor.
>
>The code starts by initializing the clock and WDT as an interval timer, then enables
interrupts. It runs OK on my prototype until the first WDT interrupt. At the end of the
interrupt handler, when it executes the reti command, the program jumps to what I thought
was the reset vector, but on closer examination turns out to be 0xffff. At this point the
program restarts.
>
>My code is nowhere near filling either flash or RAM.
>
>I am using the IAR Embedded Workbench and the TI USB debugger.
>
>Anyone have an idea what's going on here? I've written many programs for various MSP430
parts - this is the first time I've seen such behavior.
>
>Chuck Kuecker
>------------------------------------
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: MSP430F427A program resets itself - ckue...@primexinc.com - Sep 18 10:20:11 2009
Found the problem. Some code I cut 'n pasted from another project was bombing. The stack
is fine.
Thanks for the suggestions!
Chuck
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )