Cyclic Redundancy Check (CRC) is an
error detection mechanism used in communication networks and data storage. The
device resources available on a C2000 MCU to calculate a CRC have increased over
time. TIDM-1011 uses different resources depending on device features and whether
the data is transmitted or received. The resource usage is summarized in Table 2-10.
Table 2-10 Resource Used for CRC
Calculations
| Device |
Receive Data CRC |
Transmit Data CRC |
| F2837xD |
C28x plus lookup table |
C28x plus lookup table |
| F28004x |
Configurable Logic Block |
C28x lookup table |
| All others |
Configurable Logic Block |
VCRC extension to C28x |
- C28x Lookup Table is
available on all C28x devices. This method, however, is the slowest and requries
RAM memory for look-up table storage. TIDM-1011 only uses a look-up table on
devices without another capability.
- Configurable Logic Block
(CRC) is available on devices with CLB type 2, or later. The CLB
calculates a CRC using a counter configured as a Linear Feedback Shift Register
(LFSR). This method has been used to calculate the CRC of the encoder response
as the data is being received. This frees C28x bandwidth as no additional
calculations are required. The C28x reads the CRC result directly from the
counter register. The cost of this method is CLB tile resources and code to
configure the tile. The CLB CRC implementation is documented in Section 2.3.7.
- VCRC is a C28x instruction
set extension specifically for CRC calculations. The implementation is faster
than the C28x lookup-table for longer messages. In addition, the VCRC does not
require RAM space to store a lookup-table. For devices with the VCRC module,
this method has been used to calculate the transmit data CRC used in EEPROM
read/write transactions.
Note: The CRC method can be selected in
the T-Format library header file.