Цитата(bloodden @ Jun 3 2008, 11:38)

Я вчера тоже попался на этот прикол. Ноги растут из каких-то сэмплов.
WDTCTL = WDTPW + WDTHOLD; - там в комментариях к этой строчке написано что сбрасываем собаку

Вот народ и попадается периодически.
Я написал им запрос по этому поводу и получил вот такой ответ, который больше тянет на отмазку:
Цитата
Цитата
Question #2.
In the same slau144e (but in the UG for other families as well) part Watchdog timer, note 10.2.7. Software examples there is a following example:
; Periodically clear an active watchdog
MOV #WDTPW+WDTCNTCL,&WDTCTL
;
; Change watchdog timer+ interval
MOV #WDTPW+WDTCNTL+WDTSSEL,&WDTCTL
But there is no mentioning that except reset watchdog first command also switch clocking watchdog for SMCLK/32768 and switch pin RST/NMI into Reset mode.
I think this example should be changed and it should be clearly shown that in Reset command you should set the same bits which were used with watchdog start. Something like:
; Start watchdog in watchdog mode with ACLK/8192 period:
MOV #WDTPW+WDTCNTCL+WDTSSEL+WDTIS0,&WDTCTL
; Periodically clear an active watchdog
MOV #WDTPW+WDTCNTCL+WDTSSEL+WDTIS0,&WDTCTL
Or you should mention in the comments that this is repeating watchdog reset, set for SMCLK/32768 with RST/NMI in Reset mode.
Search in several forums shows that I am not the only one who met this problem.
Please be aware that the User’s Manual includes only a very small number of examples. There are some more watchdog examples included into TI code examples - which of course also not showing all possible settings. The User’s Manual is showing all available register/settings and also the standard register setting after a reset. Customer need to check/select the optimal settings fitting best to his application.