Hi,
I have a strange issue with Watchdog. I would like restart program with a PUC. For that I write bad passd into watchdog.
I read in SLA049f 10.2.2 'When the WDT is configured to operate in watchdog mode, either writing to WDTCTL with an incorrect password, or expiration of the selected time interval triggers a PUC'
I put a breakpoint in line 'CLR &WDTCTL' and make step by step in assembly windows. This commande write bad passd and never set wathdog in NMI mode.Then I think Processor read reset vector and jump to 'init:'
Against all expectations the processor jump and execute code at 0xFFFC!! That is the NMI vector (Wathdog is not configured for NMI)! BUT MORE STRANGE processor don't use that as the jump address (vector) but execute code and run through....
An explanation would be really welcome
Didier
#include "msp430.h" ; #define controlled include file
NAME main ; module name
PUBLIC main ; make the main label vissible
; outside this module
ORG 0FFFEh
DC16 init ; set reset vector to 'init' label
RSEG CSTACK ; pre-declaration of segment
RSEG CODE ; place program in 'CODE' segment
init: MOV #SFE(CSTACK), SP ; set up stack
main: NOP ; main program
// MOV.W #WDTPW+WDTHOLD,&WDTCTL ; Stop watchdog timer
CLR &WDTCTL
JMP $ ; jump to current location '$'
; (endless loop)
END