Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/13/11 05:33
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#182615 - HDD Sector CRC's
Responding to: ???'s previous message
Badri,
It is in my opinion a total waste of time to try to be reading the CRC that the HDD controller (Or USB flash controller if it even has CRC stored per sector) may put at the end of the sector after the user data field. Note that many times these codes are not actually CRCs but instead ECC codes designed to check for bits read in error from the media. If the HDD controller has CRC or ECC it is already doing the error checking inside the controller hardware or firmware. Some older HDD controllers actually had special commands that could be used to "read long" which read out the sector data and the appended ECC data. These were normally used by diagnostic routines to check to make sure that the controller was working correctly - but not for routine user checking for file level integrity.

If you want to have file level integrity checking then I strongly suggest that you compute this in your application at the time the file is written to the media and then append the computed value onto the end of the file image and adjust the file length by an appropriate amount. Later upon reading the file data then recompute the CRC as the data is read back and compare it to the last bytes read from the file.

Michael Karas


List of 13 messages in thread
TopicAuthorDate
crc in flash            01/01/70 00:00      
   Off-topic            01/01/70 00:00      
   crc in flash            01/01/70 00:00      
      No, you did not mention that!            01/01/70 00:00      
         crc in usb flash drive            01/01/70 00:00      
            What Michael Karas Said!            01/01/70 00:00      
            How to ask questions the smart way            01/01/70 00:00      
      HDD Sector CRC's            01/01/70 00:00      
   Thanks!            01/01/70 00:00      
   One more doubt!            01/01/70 00:00      
      Writing the CRC            01/01/70 00:00      
         Uncompressed archive            01/01/70 00:00      
            Great Idea            01/01/70 00:00      

Back to Subject List