|
本帖最后由 紫菁 于 2017-10-13 13:10 编辑 & o2 i5 g: O& T( g- R7 P
- T6 T5 a3 p! U* o* jPrequalification trials
" c, ?9 x7 Y( x$ p9 c& y4 q5 ~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.' K6 n: [/ c) s1 Q0 }) G
3 O9 o( Z" N# _- QDatasheet 建議你重置試試,看 MCU 能不能重新跑起來,然後觀察會不會再度發生。& d; D* `$ p: p
( k7 U l2 @2 ^4 C
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).# F* H* V/ U( i9 \
( m( L6 H( C7 q M0 P) r# N, l% OAN1015 教導你利用一些 Timer 和 WatchDog 等技巧,降低意外掛機的情況發生。
: g; k; z; m7 L% {1 R0 W S/ M$ z" h9 y" n
3.11.4 Independent watchdog (IWDG)- B l1 a& E c% M' t2 F2 Q& Z! W
The 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.1 _& A& J# f6 n2 M: ?; o
/ S- ~( Y( |& \; r$ V/ S+ V看門狗(IWDG)使用 40KHz 獨立的時鐘源,較不容易受到其它因素的影響,可利用它來防止掛機,或是用來找出掛機的原因。
5 j3 R* l8 j& i" ?4 i4 K2 k# x9 _6 v& q/ i
3 J, P; [1 w/ `& u/ o6 P
. B: W2 z& D% Q
2 ^5 ?2 _2 ~ [6 R; U# M# h' }9 \
|
|