CRC Driver

This Cyclic Redundancy Check (CRC) driver provides an interface for the CRC calculation of given length data.

The following driver variant is available:

  • CRC Synchronous Driver: The driver supports polling for hardware changes, functionality is synchronous to the main clock of the MCU.

CRC Basics and Best Practice

A Cyclic Redundancy Check (CRC) is an error-detecting code for detecting errors of raw data. It takes a data block of any length, and gives out a fixed length check value. The CRC cannot make corrections when errors are detected.

In the CRC method, a fixed length check value (often called Checksum) is appended to the transmit data block. The receiver can use the same CRC function to check whether the checksum matches the received data. If the received checksum does not match the computation checksum, it means something is wrong when the transfered data. The receiver can request the data to be send.

Below is an application example for how to use this driver:
  • Calculate a checksum for a data block to be sent and append it to the data. When the data block with checksum has been received by the receiver, the receive checksum can be compared with the new and calculated checksum from the data block.