27.3.4.1 Generic CRC Engine
The CRC engine is a serial shifting CRC calculator that is configurable through multiplexer settings. The engine can also be configured to where shift buffer data is introduced using the MOD bit (CRCCON[2]). A simplified diagram of the CRC shift engine is shown in Figure 27-2.
The CRC algorithm uses a simplified form of arithmetic process using the
XOR operation instead of binary division. The coefficients of the generator polynomial are
programmed with the CRCXOR registers. Writing a ‘1
’ into a location
enables XORing of that element in the polynomial. The length of the polynomial is
programmed using the PLEN[4:0] bits in the CRCCON register (CRCCON[20:16]). The value of
PLEN[4:0] signals the length of the polynomial and switches a multiplexer to indicate the
tap from which the feedback originated.
The result of the CRC calculation is obtained by reading the CRCWDAT registers.
- Each XOR stage of the shift engine is programmable.
- Polynomial Length n is determined by (PLEN[4:0] + 1).