English
Language : 

C8051F960-B-GM Datasheet, PDF (168/492 Pages) Silicon Laboratories – Ultra Low Power 128K, LCD MCU Family
C8051F96x
13. DMA-Enabled Cyclic Redundancy Check Module (CRC1)
C8051F96x devices include a DMA-enabled cyclic redundancy check module (CRC1) that can perform a
CRC of data using an arbitrary 16-bit polynomial. This peripheral can compute CRC results using direct
DMA access to data in XRAM.
Using a DMA transfer provides much higher data throughput than using SFR access. Since the CPU can
be in Idle mode while the CRC is calculated, CRC1 also provides substantial power savings. The CRC1
module is not restricted to a limited list of fixed polynomials. Instead, the user can specify any valid 16-bit
polynomial.
CRC1 accepts a stream of 8-bit data written to the CRC1IN register. A DMA transfer can be used to auton-
omously transfer data from XRAM to the CRC1IN SFR. The CRC1 module may also be used with SFR
access by writing directly to the CRC1IN SFR. After each byte is written, the CRC resultant is updated on
the CRC1OUTH:L SFRs. After writing all data bytes, the final CRC results are available from the
CRC1OUTH:L registers. The final results may be flipped or inverted using the FLIP and INV bits in the
CRC1CN SFR. The initial seed value can be reset to 0x0000 or seeded with 0xFFFF.
13.1. Polynomial Specification
The arbitrary polynomial should be written to the CRC1POLH:L SFRs before writing data to the CRCIN
SFR.
A valid 16-bit CRC polynomial must have an x16 term and an x0 term. Theoretically, a 16-bit polynomial
might have 17 terms total. However, the polynomial SFR is only 16-bits wide. The convention used is to
omit the x16 term. The polynomial should be written in big endian bit order. The most significant bit corre-
sponds to the highest order term. Thus, the most significant bit in the CRC1POLH SFR represents the x15
term, and the least significant bit in the CRC1POLL SFR represents the x0 term. The least significant bit of
CRC1POLL should always be set to one. The CRC results are undefined if this bit is cleared to a zero.
Figure 13.1 depicts the polynomial representation for the CRC-16-CCIT polynomial x16 + x12 + x5+ 1, or
0x1021.
CRC1POLH:L = 0x1021
CRC1POLH
CRC1POLL
7654321076543210
10001000000100001
x16+
x12+
x5+
1
Figure 13.1. Polynomial Representation
168
Rev. 1.0