Microchip logo
  • All
  • Products
  • Documents
  • Applications Notes

Cyclic Redundancy Check (CRC/SCAN)

What is CRC?

Whether you are trying to obtain regulatory compliance or to simply design a robust and reliable product, functional safety is an absolute necessity. Several methods can be used to ensure the functional safety of end products – of them, Cyclic Redundancy Check (CRC) is a powerful technique commonly used to check integrity in digital data. CRC generates an initial checksum of the data in memory that can be later compared with the calculated checksum for mismatch. A checksum mismatch can indicate an otherwise undetectable memory fault.

Why is CRC used?

Cyclic Redundancy Check, or CRC, is a vital element of functional safety, and it is one of the key methods required to meet IEC or UL safety standards such as Class B (IEC 60730). Implementation of functional safety techniques is required by law for almost all consumer appliances and industrial electronics.

How does CRC work (in PIC® and AVR® MCUs)?

Many modern PIC and AVR MCUs have a built-in hardware module for Cyclic Redundancy Check. This allows faster and low-power operation for CRC calculation without extra memory usage or an additional CPU cycle. This hardware module supports up to 16-bit polynomial and implemented with Linear Feedback Shift Register (LFSR) to generate checksum of the data which is compared with the initial checksum for mismatch. A built in SCAN feature is also available to load data from memory to the CRC module automatically. CRC for communications data Is also available for PIC MCUs.

Check microcontroller data alteration with CRC/Scan