EmbeddedRelated.com
Forums

Resetting Chip with invalid Watchdog

Started by Josh Adler April 20, 2011
I am trying to reset an F5435 by setting the watchdog with the command
WDTCTL = 0x0000 to re-enter a boot loader from my main code. The chip
restarts, but after restarting this way, certain functions do not work
correctly, like repetitive flash writing (updating the main code from
within the boot loader) locking up and/or jumping to 0x0000 (i don't
know if it does this, but IAR debugger does when I pause the (not)
running code).

I suspect it has something to do with the IVT being copied to 0x5B80
and the SYSRIVECT bit being set in SYSCTL, but returning this bit
before triggering the reset doesn't help. I know there is an issue
with some settings, because I can force a hard reset by disabling the
regulator, and after the chip restarts in this way (or by resetting
the debugger, removing batteries, etc) , everything works correctly.

So my question is this:

What registers and settings need to be reset after a watchdog
violation, to have the chip in the same state as a power up reset?
What other, if any, methods can be used to reset the chip?

Regards,

Josh

Beginning Microcontrollers with the MSP430

On 20.04.2011 01:08, Josh Adler wrote:
> I am trying to reset an F5435 by setting the watchdog with the command
> WDTCTL = 0x0000 to re-enter a boot loader from my main code. The chip
> restarts, but after restarting this way, certain functions do not work
> correctly, like repetitive flash writing (updating the main code from

Resetting the MSP through a WDT access violation issues a PUC. That
means, that not everything is reset to a state which corresponds to the
POR state.

Why don't you use 'PMMCTL0 |= PMMSWPOR;'?

Hardy