24.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 24.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 little endian,
MSB-first
BYTEREVERSE bits set for byte
reversal
BITREVERSE bit set for byte-
level bit reversal
Data is now little endian, LSB-
first for CRC calculation
Figure 24.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 24.4 Data Ordering Example - 16-bit MSB -first to LSB-first on page 808
. 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.
EFM32JG1 Reference Manual
GPCRC - General Purpose Cyclic Redundancy Check
silabs.com
| Smart. Connected. Energy-friendly.
Preliminary Rev. 0.6 | 807