UG-1262
Rev. B | Page 304 of 312
Polynomial
The CRC accelerator supports the calculation of the CRC using any length polynomial. The polynomial must be written to the
polynomial register. For MSB first implementation, omit the highest power while programming the CRC polynomial register and left
justify the polynomial. For LSB first implementation, right justify the polynomial and omit the LSB. The result register contains x-bit
MSBs as a checksum for an x-bit CRC polynomial.
The following examples illustrate the CRC polynomial.
16-Bit Polynomial Programming for MSB First Calculation
Polynomial: CRC-16-CCITT
x
16
+
x
12
+
x
5
+ 1 = (1) 0001 0000 0010 0001 = 0x1021
where the largest exponent (
x
16
term) is implied. Therefore, the polynomial is 0001 0000 0010 0001.
When left justified in the polynomial register, the register format is detailed in Table 397.
Table 397. 16-Bit Polynomial Programming Register Format, MSB First Calculation
Register
Bit(s) Value
CRC Polynomial Register (POLY)
[31:24]
0001 0000
[23:16] 0010
0001
[15:8] 0x08B0
[7:0] 0x08B0
CRC Result Register (Result)
[31:24]
CRC
[23:16] Result
[15:8] 0x08B0
[7:0] 0x08B0
Initial Seed Programmed in CRC Result Register (Result)
[31:24]
CRC
[23:16] Seed
[15:8] 0x08B0
[7:0] 0x08B0
16-Bit Polynomial Programming for LSB First Calculation
Polynomial: CRC-16-CCITT
x
16
+
x
12
+
x
5
+ 1 = 1000 0100 0000 1000 (1) = 0x8408
where the smallest exponent (
x
0
term) is implied. Therefore, the polynomial is 1000 0100 0000 1000.
When right justified in the polynomial register, the register format is detailed in Table 398.
Table 398. 16-Bit Polynomial Programming Register Format, LSB First Calculation
Register
Bit(s) Value
CRC Polynomial Register (POLY)
[31:24]
0x08B0
[23:16] 0x08B0
[15:8] 1000
0100
[7:0] 0000
1000
CRC Result Register (Result) [31:24]
0x08B0
[23:16] 0x08B0
[15:8] CRC
[7:0] Result
Initial Seed Programmed in CRC Result Register (Result)
[31:24]
0x08B0
[23:16] 0x08B0
[15:8] CRC
[7:0] Seed