1) USING THE WATCHDOG CORRECTLY
1.1 ) Enable the watchdog as soon as possible after reset, or use the Hardware Watchdog option
if its available.
1.2) Never refresh the watchdog in an interrupt routine.
2) SECURING THE UNUSED PROGRAM MEMORY AREA
fill the unused memory locations with code that forces a watchdog reset or jumps to a known program
location if you do not want to generate a reset.
3) INPUT FILTERING
Check Consistency of a PORT Pin by reading it several times before proceeding with its value in any calculation.
4) MANAGEMENT OF UNUSED INTERRUPT VECTORS
To avoid problems caused by unexpected interrupt occurrences (whatever the source) it is
recommended to manage all the possible interrupt sources by putting a valid interrupt routine
address in the corresponding vector.
5) AVERAGING THE A/D CONVERTER RESULTS
6) REGISTER REPROGRAMMING
It rarely happens that EMC disturbances alter the content of the registers. Generally the registers
concerned are clock control registers or I/O configuration and data registers because
they are close to the chip output pads.
In such cases a good security measure is to refresh these registers frequently.
1.1 ) Enable the watchdog as soon as possible after reset, or use the Hardware Watchdog option
if its available.
1.2) Never refresh the watchdog in an interrupt routine.
2) SECURING THE UNUSED PROGRAM MEMORY AREA
fill the unused memory locations with code that forces a watchdog reset or jumps to a known program
location if you do not want to generate a reset.
3) INPUT FILTERING
Check Consistency of a PORT Pin by reading it several times before proceeding with its value in any calculation.
4) MANAGEMENT OF UNUSED INTERRUPT VECTORS
To avoid problems caused by unexpected interrupt occurrences (whatever the source) it is
recommended to manage all the possible interrupt sources by putting a valid interrupt routine
address in the corresponding vector.
5) AVERAGING THE A/D CONVERTER RESULTS
6) REGISTER REPROGRAMMING
It rarely happens that EMC disturbances alter the content of the registers. Generally the registers
concerned are clock control registers or I/O configuration and data registers because
they are close to the chip output pads.
In such cases a good security measure is to refresh these registers frequently.
Source : Application notes from ST -can be downloaded from :
http://www.esnips.com/doc/195bcc71-1eb6-4cf3-80d1-ebd3cf3d1ad9/Software-Techniques-for-Improving-Microcontroller-EMC-Performance-5833
No comments:
Post a Comment