14.3.1 Polynomial Specification
POLYSEL in GPCRC_CTRL selects between 32-bit and 16-bit polynomial functions. When a 32-bit polynomial is selected, the fixed
IEEE 802.3 polynomial(0x04C11DB7) is used. When a 16-bit polynomial is selected, any valid polynomial can be defined by the user in
GPCRC_POLY.
A valid 16-bit CRC polynomial must have an x^16 term and an x^0 term. Theoretically, a 16-bit polynomial has 17 terms total. The
convention used is to omit the x^16 term. The polynomial should be written in reversed (little endian) bit order. The most significant bit
corresponds to the lowest order term. Thus, the most significant bit in CRC_POLY represents the x^0 term, and the least significant bit
in CRC_POLY represents the x^15 term. The highest significant bit of CRC_POLY should always set to 1.The polynomial representa-
tion for the CRC-16-CCIT polynomial x^16 + x^12 + x^5 + 1, or 0x8408 in reversed order, is shown in
sentation on page
349.
15
14
13
1
0
0
1+
14.3.2 Input and Output Specification
The CRC input data can be written to the GPCRC_INPUTDATA, GPCRC_INPUTDATAHWORD or GPCRC_INPUTDATABYTE regis-
ter via the APB bus based on different data size. If BYTEMODE in GPCRC_CTRL is set, only the least significant byte of the data word
will be used for the CRC calculation no matter which input register is written. There are also three output registers for different ordering.
Reading from GPCRC_DATA will get the result based on the polynomial in reversed order, while reading from GPCRC_DATAREV will
get the result based on the polynomial in normal order. The CRC calculation completes in one clock cycle. Reads from the
GPCRC_DATA, GPCRC_DATAREV or GPCRC_DATABYTEREV registers and writes to the GPCRC_CMD register are halted while
the calculation is in progress.
.
14.3.3 Initialization
The CRC can be pre-loaded or re-initialized by first writing a 32-bit programmable init value to INIT in GPCRC_INIT and then setting
INIT in GPCRC_CMD. It can also be re-initialized automatically when read from DATA, DATAREV or DATABYTEREV provided that
AUTOINIT in GPCRC_CTRL is set, the CRC would be re-initialized with the stored init value.
14.3.4 DMA Usage
A DMA channel may be used to transfer data into the CRC engine. All bytes and half-word writes must be word-aligned. The recom-
mended DMA usage model is to use the DMA to transfer all available words of data and use software writes to capture any remaining
bytes.
silabs.com | Building a more connected world.
CRC-16-CCITT Normal: 0x1021 Reversed: 0x8408
12
11
10
9
8
0
0
1
0
0
5
x
+
Figure 14.2. Polynomial Representation
GPCRC - General Purpose Cyclic Redundancy Check
POLY
7
6
5
4
0
0
0
0
Reference Manual
Figure 14.2 Polynomial Repre-
3
2
1
0
1
0
0
0
12
x
+
Rev. 0.4 | 349
1
16
x
Need help?
Do you have a question about the EFR32xG21 Wireless Gecko and is the answer not in the manual?
Questions and answers