Module Operation
628
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
Cyclic Redundancy Check (CRC) Controller Module
18.2 Module Operation
18.2.1 General Operation
There are two channels in CRC controller and for each channel there is a memory mapped PSA (Parallel
Signature Analysis) Signature Register and a memory mapped CRC (Cyclic Redundancy Check) Value
register. A memory can be organized into multiple sectors with each sector consisting of multiple data
patterns. A data pattern can be 8-, 16-, 32-, or 64-bit data. CRC module performs the signature calculation
and compares the signature to a pre-determined value. The PSA Signature Register compresses an
incoming data pattern into a signature when it is written. When one sector of data patterns are written into
PSA Signature Register, a final signature corresponding to the sector is obtained. CRC Value Register
stores the pre-determined signature corresponding to one sector of data patterns. The calculated
signature and the pre-determined signature are then compared to each other for signature verification. To
minimize CPU’s involvement, data patterns transfer can be carried out at the background of CPU using
DMA controller. DMA is setup to transfer data from memory from which the contents to be verified to the
memory mapped PSA Signature Register. When DMA transfers data to the memory mapped PSA
Signature Register, a signature is generated. A programmable 20-bit data pattern counter is used for each
channel to define the number of data patterns to calculate for each sector. Signature verification can be
performed automatically by CRC controller in AUTO mode or by CPU itself in Semi-CPU or Full-CPU
mode. In AUTO mode, a self sustained CRC signature calculation can be achieved without any CPU
intervention.
18.2.2 CRC Modes of Operation
CRC Controller can operate in AUTO, Semi-CPU, and Full-CPU modes.
18.2.2.1 AUTO Mode
In AUTO mode, CRC Controller in conjunction with DMA controller can perform CRC totally without CPU
intervention. A sustained transfer of data to both the PSA Signature Register and CRC Value Register are
performed in the background of CPU. When a mismatch is detected, an interrupt is generated to CPU. A
16 bit current sector ID register is provided to identify which sector causes a CRC failure.
18.2.2.2 Semi-CPU Mode
In Semi-CPU mode, DMA controller is also utilized to perform data patterns transfer to PSA Signature
Register. Instead of performing signature verification automatically, the CRC controller generates an
compression complete interrupt to CPU after each sector is compressed. Upon responding to the interrupt
the CPU performs the signature verification by reading the calculated signature stored at the PSA Sector
Signature Register and compare it to a pre-determined CRC value.
18.2.2.3 Full CPU Mode
In Full-CPU mode, the CPU does the data patterns transfer and signature verification all by itself. When
CPU has enough throughput, it can perform data patterns transfer by reading data from the memory
system to the PSA Signature Register. After certain number of data patterns are compressed, the CPU
can read from the PSA Signature Register and compare the calculated signature to the pre-determined
CRC signature value. In Full-CPU mode, neither interrupt nor DMA request is generated. All counters are
also disabled.