| ??? 12/11/02 22:47 Read: times |
#34286 - RE: How to use software traps?Michael |
If your program fails to work due to electrical disturbance then you should solve the problem that causes the disturbance. There is NO way you can program around what can go wrong in these situations. You can try to guess but you cannot be sure you think of every possibility!!
I point out that the use of a watch dog timer, whose timer gets continually extended when the program IS working as expected, is a far far more reliable solution. Finally, if you must have reliable system operation despite the presence of electrical disturbance then the best way to obtain it is through redundancy. You run three processors in parallel, each running the same program from its own memory stores. Each also produces its own data results in separate RAM banks. The three processes are compared periodically and if one is different then you ignore the bad one and accept the sequence of the two that agree. The errant one would then be modified to match the other two. The comparasson can be done every bus cycle or can be left to some somewhat arbitrary period say like once per millisecond. In the latter case the comparison can be some subset of the data results from the previous millisecond. But all that said.....the best is to design carefully to that the circuit is immune to upset to the highest degree possible. Your proposal of the software traps....between the subroutines....is like trying to guess which one of many tress in the forest that may fall on your house in a wind storm. The best immunity you can design for the house is to create an area around the huse that is devoid of ALL the trees. Michael Karas |



