|
本帖最后由 紫菁 于 2017-10-13 13:10 编辑 # W( g) `4 e3 H% B1 [$ \: y/ t. W
; ~. o) a' [9 \1 {Prequalification trials
) R/ F# k. d1 HMost 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.
' V5 ]1 T% M+ M' a. q+ x2 J, b7 C
Datasheet 建議你重置試試,看 MCU 能不能重新跑起來,然後觀察會不會再度發生。
8 t8 O0 I7 o4 n
3 a: j9 g5 M( l6 [( a& p- m: OTo 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).
3 O3 u+ g* H K3 c
2 n, I) d, R+ a( aAN1015 教導你利用一些 Timer 和 WatchDog 等技巧,降低意外掛機的情況發生。) {+ ~- l7 e5 e4 @3 V8 r5 L$ M
/ c: V6 }3 p, W
3.11.4 Independent watchdog (IWDG)8 ^6 o2 W, g0 O/ |. A
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 t1 G! J9 s# S
) g& H; z/ d* N4 F: }6 W p
看門狗(IWDG)使用 40KHz 獨立的時鐘源,較不容易受到其它因素的影響,可利用它來防止掛機,或是用來找出掛機的原因。( S4 k7 f2 \6 k- }
# [( x& {, D$ r# R4 n
8 r9 f& k2 z4 d( G
5 X D; w4 j% U- O" Y
6 `9 R5 N0 j, f/ n( H% A4 C4 w9 ~" E3 H) j9 c# e2 f5 T
|
|