micro self-check of checksum

The OP wanted to test the integrity more or less directly after power on and in those cases it should be quite easy. The hardware shall be designed in a way that it is in a safe state (provided it is not broken) after reset. If the CPU fails to even fetch the reset vector (or whatever it does first depending on architecture) nothing bad must happen. If there is a checksum failure there is no sense in going further, entering an eternal loop takes a minimum of code which makes it less likely to be affected by the code being corrupted.

Usually I design the hardware so that if there is an error indication it is activated at power on and switched off by the software when it is up and running. We also usually have watchdogs that are enabled by software to avoid repeated resets if the software is halted due to checksum failure. The watchdog is enabled after the checksum is verified and then it can not be disabled.

So, in short, if detecting a checksum failure in an early stage after reset, doing nothing is often the most sensible action.

/Henrik

Reply to
Henrik Johnsson
Loading thread data ...

OK, so we have a vote each for 0, 1 and many :) So apparently you can get field failures that are detectable and still react.

Even small amounts of real data trump speculation.

Robert

Reply to
R Adsett

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.