|
本帖最后由 紫菁 于 2017-10-13 13:10 编辑
' D; X) |% t9 S- C4 _7 i! C# ]+ b5 K) s* k
Prequalification trials% p2 f! d5 L' y2 O2 l# L* N' z
Most of the common failures (unexpected reset and program counter corruption) can be reproduced by manually forcing a low state on the NRST pin or the Oscillator pins for 1 second./ ]8 Q5 Q- e# r% G3 g
' o8 X3 K3 u0 p/ zDatasheet 建議你重置試試,看 MCU 能不能重新跑起來,然後觀察會不會再度發生。
% x6 N6 ~/ a. K3 ~! j; q+ |: I* `. O) i" s9 s
To complete these trials, ESD stress can be applied directly on the device, over the range of specification values. When unexpected behavior is detected, the software can be hardened to prevent unrecoverable errors occurring (see application note AN1015).. G; h9 w* p0 g4 z1 X$ e* v
9 v% P: R8 ~' n6 v4 g% ~. O/ a) L
AN1015 教導你利用一些 Timer 和 WatchDog 等技巧,降低意外掛機的情況發生。. L5 c* n7 N* b1 n9 T0 K% q' ]5 l
) V. J5 E! y+ o4 }5 L- l/ W* K
3.11.4 Independent watchdog (IWDG)
- Y1 x! h9 i% a1 MThe independent watchdog is based on an 8-bit prescaler and 12-bit downcounter with user-defined refresh window. It is clocked from an independent 40 kHz internal RC and as it operates independently from the main clock, it can operate in Stop and Standby modes. It can be used either as a watchdog to reset the device when a problem occurs, or as a free running timer for application timeout management. It is hardware or software configurable through the option bytes. The counter can be frozen in debug mode.
& Q# G5 ` n% [+ _; W
9 M" J: c6 f& A- m, i% x2 S& J看門狗(IWDG)使用 40KHz 獨立的時鐘源,較不容易受到其它因素的影響,可利用它來防止掛機,或是用來找出掛機的原因。7 E4 A- L; {- g/ D4 \
" e. O4 r# n; f5 t. S2 i
E3 f3 a4 f' I3 {& O% f
, Q4 M4 |" M- c! ~6 E- _) `2 `& A3 {: L0 v [
: x2 @: j# H. J/ R. J |
|