29.3.5 Byte-Level Bit Reversal and Byte Reordering
The byte-level bit reversal and byte reordering operations occur before the data is used in the CRC calculation. Byte reordering can
occur on words or half words. The hardware ignores the BYTEREVERSE field with any byte writes or operations with byte mode ena-
bled (BYTEMODE = 1), but the bit reversal settings (BITREVERSE) are still applied to the byte. 32-bit little endian MSB-first data can
be treated like 32-bit little endian LSB-first data, as shown in
Figure 29.3 Data Ordering Example - 32-bit MSB -first to LSB-first on page
. In this example, 32-bit data is written to GPCRC_INPUTDATA, BYTEREVERSE is set for byte ordering, and BITREVERSE is set
for byte-level bit reversal.
bit 7
bit 5
bit 4
bit 6
bit 2
bit 0
bit 3
bit 1
Byte 2
bit 7
bit 5
bit 4
bit 6
bit 2
bit 0
bit 3
bit 1
Byte 1
Byte 0
bit 7
bit 5
bit 4
bit 6
bit 2
bit 0
bit 3
bit 1
Byte 0
bit 7
bit 5
bit 4
bit 6
bit 2
bit 0
bit 3
bit 1
bit 7
bit 5
bit 4
bit 6
bit 2
bit 0
bit 3
bit 1
Byte 1
bit 7
bit 5
bit 4
bit 6
bit 2
bit 0
bit 3
bit 1
Byte 2
bit 7
bit 5
bit 4
bit 6
bit 2
bit 0
bit 3
bit 1
Byte 3
bit 7
bit 5
bit 4
bit 6
bit 2
bit 0
bit 3
bit 1
Byte 3
bit 0
bit 2
bit 3
bit 1
bit 5
bit 7
bit 4
bit 6
Byte 2
bit 0
bit 2
bit 3
bit 1
bit 5
bit 7
bit 4
bit 6
Byte 0
bit 0
bit 2
bit 3
bit 1
bit 5
bit 7
bit 4
bit 6
Byte 1
bit 0
bit 2
bit 3
bit 1
bit 5
bit 7
bit 4
bit 6
Byte 3
Input data is big endian, MSB-
first
BYTEREVERSE = 1
BITREVERSE = 1
Data is now little endian, LSB-
first for CRC calculation
Figure 29.3. Data Ordering Example - 32-bit MSB -first to LSB-first
When handling 16-bit data, the byte reordering function only swap the two lowest bytes and clear the two highest bytes, as shown in
Figure 29.4 Data Ordering Example - 16-bit MSB -first to LSB-first on page 1003
. In this example, 16-bit data is written to GPCRC_IN-
PUTDATAHWORD, BYTEREVERSE is set for byte ordering, and BITREVERSE is set for byte-level bit reversal.
Reference Manual
GPCRC - General Purpose Cyclic Redundancy Check
silabs.com
| Building a more connected world.
Rev. 1.1 | 1002