Systems and methods are disclosed to detect and correct errors in a flash
memory by detecting in hardware an error based on one of three selectable
modes of error detection and correction; and correcting the error by
executing error correction software corresponding to the selected mode of
error detection and correction.